mirror of https://github.com/sveltejs/svelte
fix: prevent onoutroend from firing twice when compilerOptions.hmr is true (#18655)
Fixes #18440 `hmr()` in `packages/svelte/src/internal/client/dev/hmr.js` wrapped a component in a `block` effect containing a `branch` effect. It forwarded the inner effect's `nodes` object to the outer block: This shared the same reference, meaning `outer_block.nodes === inner_branch.nodes`. When `pause_children` collected transitions for unmounting, Each collected transition had `out(check)` called multiple times, starting multiple animations and firing `outroend` multiple times. Fix by only copying `start`/`end` (the DOM range info the outer block needs) without sharing the transitions array:pull/18680/merge
parent
a7ba9e85aa
commit
faf1e103c5
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'svelte': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix: prevent onoutroend from firing twice when compilerOptions.hmr is true
|
||||||
Loading…
Reference in new issue