Open LonelyVikingMichael opened 3 years ago
Looks like this is related somehow to transition promises. After removing the transition:fade
attributes from the child components, the routing issue is resolved.
How can I work around this?
I encountered the same issue. Adding |local
to all my transitions worked for me (ie: transition:fade|local
)
Thanks @leddt, that solution worked for me as well.
I encountered the same issue. Adding
|local
to all my transitions worked for me (ie:transition:fade|local
)
This solved it for me as well, thank you.
@mefechoel - this might be worth a mention in the docs?
+1 with last comment, should be mentioned in the docs.
I'm not explicitly specifying any transitions anywhere. Just taking the defaults. Where would you recommend putting the transition:fade|local
?
I'm not explicitly specifying any transitions anywhere. Just taking the defaults. Where would you recommend putting the
transition:fade|local
?
Could it be used inside a 3rd party library you use? I had a nested alert component that had a fade on it, but it was created in an external library so for me it was not obvious at first glance where the transition was placed.
Ultimately I was misusing nested and/or relative paths in routes. After making all routes fully qualified all over the app my problems stopped happening.
Started with this:
<Route path="users/*">
<Route path="edit/:id" let:params>
<EditUser id={params.id} />
</Route>
</Route>
The outer route was relative, which I didn't fully understand. So depending on where I was in the app it would either render correctly or throw the above exception. The exception took me in the wrong direction when the fix was just route related.
Changed all my routes to this:
<Route path="/users/edit/:id" let:params>
<EditUser id={params.id} />
</Route>
It's more explicit and, given the size of my app, easily manageable.
If the library handled the exception in a more obvious way it would have been helpful, but ultimately this was my fault.
Describe the bug The screenshot below shows that
join()
is being passedpathFragments
ofnull
and""
respectively inpaths.js
. This ultimately leads to aTypeError: str is null
in thestripSlashes()
function. I can see from the stack trace that $parentBase is the null value in question inRoute.svelte
.To Reproduce Difficult, my codebase is a bit involved at this point. I have two
<a>
elements on a navbar withuse:link
attributes. Normally, they switch between pages/views perfectly. One of my pages renders child component forms conditionally, based on someon:click
logic to mount/destroy the child components. These children in no way interact with routing. This error only occurs if any of the child components forms are loaded and I select the other<a>
on my navbar.Screenshots Full stack trace
Desktop (please complete the following information):
Please let me know if you require any additional info, I'll try to put together a minimal example and reproduce in a REPL Thanks for your work, I really enjoy using this library and the examples in the docs helped a lot.