@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/dist/router.umd.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @remix-run/router v1.6.
|
|
2
|
+
* @remix-run/router v1.6.1
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -3456,7 +3456,7 @@
|
|
|
3456
3456
|
} // Resolve the relative path
|
|
3457
3457
|
|
|
3458
3458
|
|
|
3459
|
-
let path = resolveTo(to ? to : ".", getPathContributingMatches(contextualMatches).map(m => m.pathnameBase), location.pathname, relative === "path"); // When `to` is not specified we inherit search/hash from the current
|
|
3459
|
+
let path = resolveTo(to ? to : ".", getPathContributingMatches(contextualMatches).map(m => m.pathnameBase), stripBasename(location.pathname, basename) || location.pathname, relative === "path"); // When `to` is not specified we inherit search/hash from the current
|
|
3460
3460
|
// location, unlike when to="." and we just inherit the path.
|
|
3461
3461
|
// See https://github.com/remix-run/remix/issues/927
|
|
3462
3462
|
|
|
@@ -3590,7 +3590,7 @@
|
|
|
3590
3590
|
actionResult,
|
|
3591
3591
|
defaultShouldRevalidate: // Forced revalidation due to submission, useRevalidator, or X-Remix-Revalidate
|
|
3592
3592
|
isRevalidationRequired || // Clicked the same link, resubmitted a GET form
|
|
3593
|
-
currentUrl.
|
|
3593
|
+
currentUrl.pathname + currentUrl.search === nextUrl.pathname + nextUrl.search || // Search params affect all loaders
|
|
3594
3594
|
currentUrl.search !== nextUrl.search || isNewRouteInstance(currentRouteMatch, nextRouteMatch)
|
|
3595
3595
|
}));
|
|
3596
3596
|
}); // Pick fetcher.loads that need to be revalidated
|
|
@@ -4205,7 +4205,22 @@
|
|
|
4205
4205
|
}
|
|
4206
4206
|
|
|
4207
4207
|
function isHashChangeOnly(a, b) {
|
|
4208
|
-
|
|
4208
|
+
if (a.pathname !== b.pathname || a.search !== b.search) {
|
|
4209
|
+
return false;
|
|
4210
|
+
}
|
|
4211
|
+
|
|
4212
|
+
if (a.hash === "") {
|
|
4213
|
+
// No hash -> hash
|
|
4214
|
+
return b.hash !== "";
|
|
4215
|
+
} else if (a.hash === b.hash) {
|
|
4216
|
+
// current hash -> same hash
|
|
4217
|
+
return true;
|
|
4218
|
+
} else if (b.hash !== "") {
|
|
4219
|
+
// current hash -> new hash
|
|
4220
|
+
return true;
|
|
4221
|
+
}
|
|
4222
|
+
|
|
4223
|
+
return false;
|
|
4209
4224
|
}
|
|
4210
4225
|
|
|
4211
4226
|
function isDeferredResult(result) {
|