@remix-run/router 1.0.4-pre.0 → 1.0.4
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 +4 -4
- package/dist/router.cjs.js +7 -2
- package/dist/router.cjs.js.map +1 -1
- package/dist/router.js +7 -2
- package/dist/router.js.map +1 -1
- package/dist/router.umd.js +7 -2
- 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 +5 -1
package/dist/router.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @remix-run/router v1.0.4
|
|
2
|
+
* @remix-run/router v1.0.4
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Remix Software Inc.
|
|
5
5
|
*
|
|
@@ -2151,7 +2151,12 @@ function createRouter(init) {
|
|
|
2151
2151
|
invariant(redirectLocation, "Expected a location on the redirect navigation");
|
|
2152
2152
|
|
|
2153
2153
|
if (redirect.external && typeof window !== "undefined" && typeof window.location !== "undefined") {
|
|
2154
|
-
|
|
2154
|
+
if (replace) {
|
|
2155
|
+
window.location.replace(redirect.location);
|
|
2156
|
+
} else {
|
|
2157
|
+
window.location.assign(redirect.location);
|
|
2158
|
+
}
|
|
2159
|
+
|
|
2155
2160
|
return;
|
|
2156
2161
|
} // There's no need to abort on redirects, since we don't detect the
|
|
2157
2162
|
// redirect until the action/loaders have settled
|