Svelte Transitions break the back button
bobspace opened this issue · comments
Bob Walton commented
Including svelte transitions in a child component of a Route
throws runtime errors when you navigate back from that route.
Here's a REPL that repros the issue: https://svelte.dev/repl/fbf4cecab51842758c2e3e5a746a7dc3?version=3.50.1
- Go to the REPL above
- Click on 'Press for Error Test'
- Press the back button
- See error
Replicated on desktop:
- OS: MacOS 12.4
- Browser Safari
- Version 15.5
Simon Conrad commented
Append |local
to the transition declaration (e.g. transition:fade
→ transition:fade|local
). See also: https://svelte.dev/tutorial/local-transitions