@remix-run/router 1.6.0 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/router.cjs.js +19 -4
- package/dist/router.cjs.js.map +1 -1
- package/dist/router.js +19 -4
- package/dist/router.js.map +1 -1
- package/dist/router.umd.js +19 -4
- package/dist/router.umd.js.map +1 -1
- package/dist/router.umd.min.js +2 -2
- package/dist/router.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/router.ts +19 -5
package/package.json
CHANGED
package/router.ts
CHANGED
|
@@ -3094,7 +3094,7 @@ function normalizeTo(
|
|
|
3094
3094
|
let path = resolveTo(
|
|
3095
3095
|
to ? to : ".",
|
|
3096
3096
|
getPathContributingMatches(contextualMatches).map((m) => m.pathnameBase),
|
|
3097
|
-
location.pathname,
|
|
3097
|
+
stripBasename(location.pathname, basename) || location.pathname,
|
|
3098
3098
|
relative === "path"
|
|
3099
3099
|
);
|
|
3100
3100
|
|
|
@@ -3266,7 +3266,8 @@ function getMatchesToLoad(
|
|
|
3266
3266
|
// Forced revalidation due to submission, useRevalidator, or X-Remix-Revalidate
|
|
3267
3267
|
isRevalidationRequired ||
|
|
3268
3268
|
// Clicked the same link, resubmitted a GET form
|
|
3269
|
-
currentUrl.
|
|
3269
|
+
currentUrl.pathname + currentUrl.search ===
|
|
3270
|
+
nextUrl.pathname + nextUrl.search ||
|
|
3270
3271
|
// Search params affect all loaders
|
|
3271
3272
|
currentUrl.search !== nextUrl.search ||
|
|
3272
3273
|
isNewRouteInstance(currentRouteMatch, nextRouteMatch),
|
|
@@ -4003,9 +4004,22 @@ function stripHashFromPath(path: To) {
|
|
|
4003
4004
|
}
|
|
4004
4005
|
|
|
4005
4006
|
function isHashChangeOnly(a: Location, b: Location): boolean {
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4007
|
+
if (a.pathname !== b.pathname || a.search !== b.search) {
|
|
4008
|
+
return false;
|
|
4009
|
+
}
|
|
4010
|
+
|
|
4011
|
+
if (a.hash === "") {
|
|
4012
|
+
// No hash -> hash
|
|
4013
|
+
return b.hash !== "";
|
|
4014
|
+
} else if (a.hash === b.hash) {
|
|
4015
|
+
// current hash -> same hash
|
|
4016
|
+
return true;
|
|
4017
|
+
} else if (b.hash !== "") {
|
|
4018
|
+
// current hash -> new hash
|
|
4019
|
+
return true;
|
|
4020
|
+
}
|
|
4021
|
+
|
|
4022
|
+
return false;
|
|
4009
4023
|
}
|
|
4010
4024
|
|
|
4011
4025
|
function isDeferredResult(result: DataResult): result is DeferredResult {
|