You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
If the user clicks on an internal link before the JS of the page finishes loading, the route changes but Svelte never navigates to the page. An Uncaught Promise is thrown in the logs with the message: TypeError: can't access property "path", this.current.page is null. This only happens consistently in production. I didn't manage to reproduce it in https://kit.svelte.dev at all, but I did manage to reproduce it consistently in my site which uses adapter-static.
To Reproduce
In the browser (e.g. Firefox) set throttling to Regular 2G (or something slow enough for you to click an internal link before JS finishes loading) and click the link. The URL should change to the appropriate value but the page never changes. An error is thrown in the console. I haven't managed to reproduce it consistently on a local environment, just on the production site. Using svelte-kit build && svelte-kit start does make the bug appear but rarely.
Screen.Recording.2021-03-25.at.01.58.53.mov
Expected behavior
Clicking a link before JS loads should work as clicking a link in a page without JS at all.
Describe the bug
If the user clicks on an internal link before the JS of the page finishes loading, the route changes but Svelte never navigates to the page. An
Uncaught Promise
is thrown in the logs with the message:TypeError: can't access property "path", this.current.page is null
. This only happens consistently in production. I didn't manage to reproduce it in https://kit.svelte.dev at all, but I did manage to reproduce it consistently in my site which usesadapter-static
.Logs
To Reproduce
In the browser (e.g. Firefox) set throttling to Regular 2G (or something slow enough for you to click an internal link before JS finishes loading) and click the link. The URL should change to the appropriate value but the page never changes. An error is thrown in the console. I haven't managed to reproduce it consistently on a local environment, just on the production site. Using
svelte-kit build && svelte-kit start
does make the bug appear but rarely.Screen.Recording.2021-03-25.at.01.58.53.mov
Expected behavior
Clicking a link before JS loads should work as clicking a link in a page without JS at all.
Stacktraces
No stack trace.
Information about your SvelteKit Installation:
Tested in Firefox Developer Edition 87.0
Adapter: static
Severity
Might block users with slow connections since the site will feel broken to them.
Additional context
I had a similar issue with sites built using
sapper export
as well.The text was updated successfully, but these errors were encountered: