mirror of https://github.com/sveltejs/svelte
fix: Prevent intro from cancelling outro (#7300)
The issue 1. When the block.i (intro) is called it registers a callback (via add_render_callback) 2. Then the block.o (outro) is called and start the outro and adds a callback to detach on outroend 3. The render callback from the intro is executed, starts the intro and cancels the outro animation This causes components that should've been destroyed to stay on the page. The fix in this PR: Inside the intro render callback it checks if it is still current and if it isn't (because an outro was triggered) it won't start the intro animation. fixes #6152 fixes #6812pull/8381/head
parent
7578af3a11
commit
fb5f281e9a
Loading…
Reference in new issue