@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/package.json
CHANGED
package/src/router.ts
CHANGED
|
@@ -1037,10 +1037,12 @@ export class RouterCore<
|
|
|
1037
1037
|
TRouterHistory,
|
|
1038
1038
|
TDehydrated
|
|
1039
1039
|
> = (newOptions) => {
|
|
1040
|
-
if (
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1040
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
1041
|
+
if (newOptions.notFoundRoute) {
|
|
1042
|
+
console.warn(
|
|
1043
|
+
'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.',
|
|
1044
|
+
)
|
|
1045
|
+
}
|
|
1044
1046
|
}
|
|
1045
1047
|
|
|
1046
1048
|
const prevOptions = this.options
|
|
@@ -2702,7 +2704,9 @@ export class RouterCore<
|
|
|
2702
2704
|
isDangerousProtocol(redirect.options.href, this.protocolAllowlist)
|
|
2703
2705
|
) {
|
|
2704
2706
|
throw new Error(
|
|
2705
|
-
|
|
2707
|
+
process.env.NODE_ENV !== 'production'
|
|
2708
|
+
? `Redirect blocked: unsafe protocol in href "${redirect.options.href}". Allowed protocols: ${Array.from(this.protocolAllowlist).join(', ')}.`
|
|
2709
|
+
: 'Redirect blocked: unsafe protocol',
|
|
2706
2710
|
)
|
|
2707
2711
|
}
|
|
2708
2712
|
|