-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
$parentBase with null value causes error in segmentize function #43
Comments
Looks like this is related somehow to transition promises. After removing the How can I work around this? |
I encountered the same issue. Adding |
Thanks @leddt, that solution worked for me as well. |
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 |
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:
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:
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 some
on: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.
The text was updated successfully, but these errors were encountered: