Skip to content

Commit f4e220c

Browse files
committed
[chore] Better transition start/end debug log
1 parent 9b60377 commit f4e220c

1 file changed

Lines changed: 11 additions & 6 deletions

File tree

src/SharedElementRendererData.ts

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -343,12 +343,17 @@ export default class SharedElementRendererData
343343
}
344344
}
345345
if (this.sharedElements !== sharedElements) {
346-
if (this.debug)
347-
console.debug(
348-
`Transitioning from "${prevScene?.name}" to "${
349-
scene?.name
350-
}", elements: ${JSON.stringify(sharedElements)}`
351-
);
346+
if (this.debug) {
347+
if (sharedElements) {
348+
console.debug(
349+
`Transition start: "${prevScene?.name}" -> "${
350+
scene?.name
351+
}", elements: ${JSON.stringify(sharedElements, undefined, 2)}`
352+
);
353+
} else {
354+
console.debug(`Transition end: "${scene?.name}"`);
355+
}
356+
}
352357
this.sharedElements = sharedElements;
353358
this.isShowing = isShowing;
354359
/*console.log(

0 commit comments

Comments
 (0)