Skip to content

Commit

Permalink
increase robustness
Browse files Browse the repository at this point in the history
  • Loading branch information
martrapp committed Aug 30, 2024
1 parent 4539e60 commit 7796f7c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/warm-items-pump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro-vtbot': patch
---

Fixed an issue where VtBotDebug throws errors when analzing animations of cross-document transitions
5 changes: 4 additions & 1 deletion components/VtBotDebug.astro
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,10 @@ const active = import.meta.env.DEV || production;

function animationEnd(e: Event) {
if (e instanceof AnimationEvent) {
animations[transition(e)]![e.pseudoElement]![e.animationName]!.end = e;
animations[transition(e)] &&
animations[transition(e)]![e.pseudoElement] &&
animations[transition(e)]![e.pseudoElement]![e.animationName] &&
(animations[transition(e)]![e.pseudoElement]![e.animationName]!.end = e);
}
}

Expand Down

0 comments on commit 7796f7c

Please sign in to comment.