-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
fix(5457): normalize path on prefetch #5458
Conversation
🦋 Changeset detectedLatest commit: 29a7196 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
I have no idea what's happening but this is fun to watch. As a sidenote, I was thinking about normalizing before matching: const path = decodeURI(url.pathname.slice(base.length) || '/');
const normalized_path = normalize_path(url.pathname, trailing_slash);
for (const route of routes) {
const params = route.exec(normalized_path);
if (params) {
const id = normalized_path + url.search;
/** @type {import('./types').NavigationIntent} */
const intent = { id, route, params, url };
return intent;
}
} It may solve current and future issues, or may not, I have no idea. |
Thanks!
I don't think there's any benefit to doing so — it's the same amount of work in either case |
Fixes #5457