@tanstack/router-core 1.162.5 → 1.162.6
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/dist/cjs/router.cjs +7 -5
- package/dist/cjs/router.cjs.map +1 -1
- package/dist/esm/router.js +7 -5
- package/dist/esm/router.js.map +1 -1
- package/package.json +1 -1
- package/src/router.ts +9 -5
package/dist/cjs/router.cjs
CHANGED
|
@@ -72,10 +72,12 @@ class RouterCore {
|
|
|
72
72
|
this.isScrollRestorationSetup = false;
|
|
73
73
|
this.startTransition = (fn) => fn();
|
|
74
74
|
this.update = (newOptions) => {
|
|
75
|
-
if (
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
75
|
+
if (process.env.NODE_ENV !== "production") {
|
|
76
|
+
if (newOptions.notFoundRoute) {
|
|
77
|
+
console.warn(
|
|
78
|
+
"The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info."
|
|
79
|
+
);
|
|
80
|
+
}
|
|
79
81
|
}
|
|
80
82
|
const prevOptions = this.options;
|
|
81
83
|
const prevBasepath = this.basepath ?? prevOptions?.basepath ?? "/";
|
|
@@ -926,7 +928,7 @@ class RouterCore {
|
|
|
926
928
|
if (redirect2.options.href && !redirect2.options._builtLocation && // Check for dangerous protocols before processing the redirect
|
|
927
929
|
utils.isDangerousProtocol(redirect2.options.href, this.protocolAllowlist)) {
|
|
928
930
|
throw new Error(
|
|
929
|
-
`Redirect blocked: unsafe protocol in href "${redirect2.options.href}". Allowed protocols: ${Array.from(this.protocolAllowlist).join(", ")}.`
|
|
931
|
+
process.env.NODE_ENV !== "production" ? `Redirect blocked: unsafe protocol in href "${redirect2.options.href}". Allowed protocols: ${Array.from(this.protocolAllowlist).join(", ")}.` : "Redirect blocked: unsafe protocol"
|
|
930
932
|
);
|
|
931
933
|
}
|
|
932
934
|
if (!redirect2.headers.get("Location")) {
|