Skip to content

Commit

Permalink
Fix animation cancellation in token-transitions
Browse files Browse the repository at this point in the history
  • Loading branch information
pomber committed Oct 2, 2024
1 parent 496d34c commit 788f766
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/codehike/src/utils/token-transitions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ function toSnapshotElement(el: HTMLElement): SnapshotElement {
y += p.offsetTop
p = p.offsetParent
}
el?.getAnimations().forEach((a) => a.cancel())
const style = window.getComputedStyle(el)
const color = style.color
const content = el.textContent
Expand Down

0 comments on commit 788f766

Please sign in to comment.