Skip to content

Commit edf895a

Browse files
committed
tweak
1 parent 4958d97 commit edf895a

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

packages/svelte/src/internal/client/transitions.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -445,15 +445,13 @@ function create_transition(dom, init, direction, effect) {
445445
const css_fn = payload.css;
446446
const easing_fn = payload.easing || linear;
447447
const keyframes = create_keyframes(easing_fn, css_fn, duration, direction, true);
448-
const current_animation = /** @type {Animation} */ (animation);
449-
const effect = current_animation.effect;
450-
if (effect != null) {
448+
if (/** @type {Animation} */ (animation).effect != null) {
451449
// If we have an existing animation, we need to pause it and create a new animation
452450
// with the new frames.
453451
animation.pause();
454452
create_animation();
455453
// @ts-ignore
456-
effect.setKeyframes(keyframes);
454+
animation.effect.setKeyframes(keyframes);
457455
}
458456
}
459457
/** @type {Animation | TickAnimation} */ (animation).reverse();

0 commit comments

Comments
 (0)