mefechoel / svelte-navigator

Simple, accessible routing for Svelte
Other
509 stars 39 forks source link

Svelte Transitions break the back button #92

Open bobspace opened 2 years ago

bobspace commented 2 years ago

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

  1. Go to the REPL above
  2. Click on 'Press for Error Test'
  3. Press the back button
  4. See error
image

Replicated on desktop:

IsAvaible commented 2 years ago

Append |local to the transition declaration (e.g. transition:fadetransition:fade|local). See also: https://svelte.dev/tutorial/local-transitions