From e4b7304365d5f0c95223bcaa25290f933174d40e Mon Sep 17 00:00:00 2001 From: Dominic Gannaway Date: Thu, 15 Aug 2024 22:17:20 +0100 Subject: [PATCH] fix: ensure outro animation is not prematurely aborted (#12865) --- .changeset/lazy-carrots-buy.md | 5 +++++ .../svelte/src/internal/client/dom/elements/transitions.js | 2 -- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 .changeset/lazy-carrots-buy.md diff --git a/.changeset/lazy-carrots-buy.md b/.changeset/lazy-carrots-buy.md new file mode 100644 index 0000000000..e9d14c2f0b --- /dev/null +++ b/.changeset/lazy-carrots-buy.md @@ -0,0 +1,5 @@ +--- +'svelte': patch +--- + +fix: ensure outro animation is not prematurely aborted diff --git a/packages/svelte/src/internal/client/dom/elements/transitions.js b/packages/svelte/src/internal/client/dom/elements/transitions.js index f747e2f402..5cd0870fdc 100644 --- a/packages/svelte/src/internal/client/dom/elements/transitions.js +++ b/packages/svelte/src/internal/client/dom/elements/transitions.js @@ -251,8 +251,6 @@ export function transition(flags, element, get_fn, get_params) { 0, () => { dispatch_event(element, 'outroend'); - // Ensure we cancel the animation to prevent leaking - outro?.abort(); outro = current_options = undefined; fn?.(); },