From 7aaa3e4698aee8f2dda7bc198313697598695a32 Mon Sep 17 00:00:00 2001 From: paoloricciuti Date: Sun, 15 Oct 2023 17:22:31 +0200 Subject: [PATCH] ix: clean the listeners immediately in should apply --- .changeset/good-walls-warn.md | 5 +++++ src/lib/sveltekit-view-transition.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/good-walls-warn.md diff --git a/.changeset/good-walls-warn.md b/.changeset/good-walls-warn.md new file mode 100644 index 0000000..544500c --- /dev/null +++ b/.changeset/good-walls-warn.md @@ -0,0 +1,5 @@ +--- +'sveltekit-view-transition': patch +--- + +fix: clean the listeners immediately in should apply diff --git a/src/lib/sveltekit-view-transition.ts b/src/lib/sveltekit-view-transition.ts index 0d492b2..8aff000 100644 --- a/src/lib/sveltekit-view-transition.ts +++ b/src/lib/sveltekit-view-transition.ts @@ -324,7 +324,7 @@ function transition(node: HTMLElement | SVGElement, props: string | TransitionAc off_functions.push(off_finished); return () => { off_functions.forEach((off) => { - off(true); + off(false); }); }; }