@remix-run/router 1.0.4-pre.0 → 1.0.4-pre.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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # `@remix-run/router`
2
2
 
3
+ ## 1.0.4-pre.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Respect `replace` behavior on external redirects ([#9654](https://github.com/remix-run/react-router/pull/9654))
8
+
3
9
  ## 1.0.4-pre.0
4
10
 
5
11
  ### Patch Changes
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @remix-run/router v1.0.4-pre.0
2
+ * @remix-run/router v1.0.4-pre.1
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -2195,7 +2195,12 @@ function createRouter(init) {
2195
2195
  invariant(redirectLocation, "Expected a location on the redirect navigation");
2196
2196
 
2197
2197
  if (redirect.external && typeof window !== "undefined" && typeof window.location !== "undefined") {
2198
- window.location.replace(redirect.location);
2198
+ if (replace) {
2199
+ window.location.replace(redirect.location);
2200
+ } else {
2201
+ window.location.assign(redirect.location);
2202
+ }
2203
+
2199
2204
  return;
2200
2205
  } // There's no need to abort on redirects, since we don't detect the
2201
2206
  // redirect until the action/loaders have settled