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
The id in that function is taken from intent that is returned from get_navigation_intent. The id in this intent from what I see is used as a cache key. It is, in fact, a URL, not a route ID:
As a result of this, route_changed is always true, which I think will invalidate any layouts all the time if they happen to have something that accesses event.route.id in the stack.
Algoinde
changed the title
Route invalidation check is broken due to strangely named parameter inside intent returned from get_navigation_intent
Route invalidation check is broken due to comparing to intent id, not url and route
Jan 8, 2023
Describe the bug
When investigating the invalidation mishappenings in my project, I came upon these lines:
https://github.com/sveltejs/kit/blame/4ff91b0e98f571b5e3b0f6e4fc30481426fd6255/packages/kit/src/runtime/client/client.js#L712
The
id
in that function is taken fromintent
that is returned fromget_navigation_intent
. Theid
in this intent from what I see is used as a cache key. It is, in fact, a URL, not a route ID:Later this is used in the aforementioned comparison:
As a result of this,
route_changed
is always true, which I think will invalidate any layouts all the time if they happen to have something that accessesevent.route.id
in the stack.Reproduction
https://stackblitz.com/edit/sveltejs-kit-template-default-4tqaxj?file=src/routes/stuff/+layout.js
Switch between
about
andnotAbout
in the header.System Info
Severity
annoyance
The text was updated successfully, but these errors were encountered: