@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.
@@ -70,10 +70,12 @@ class RouterCore {
70
70
  this.isScrollRestorationSetup = false;
71
71
  this.startTransition = (fn) => fn();
72
72
  this.update = (newOptions) => {
73
- if (newOptions.notFoundRoute) {
74
- console.warn(
75
- "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."
76
- );
73
+ if (process.env.NODE_ENV !== "production") {
74
+ if (newOptions.notFoundRoute) {
75
+ console.warn(
76
+ "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."
77
+ );
78
+ }
77
79
  }
78
80
  const prevOptions = this.options;
79
81
  const prevBasepath = this.basepath ?? prevOptions?.basepath ?? "/";
@@ -924,7 +926,7 @@ class RouterCore {
924
926
  if (redirect2.options.href && !redirect2.options._builtLocation && // Check for dangerous protocols before processing the redirect
925
927
  isDangerousProtocol(redirect2.options.href, this.protocolAllowlist)) {
926
928
  throw new Error(
927
- `Redirect blocked: unsafe protocol in href "${redirect2.options.href}". Allowed protocols: ${Array.from(this.protocolAllowlist).join(", ")}.`
929
+ 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"
928
930
  );
929
931
  }
930
932
  if (!redirect2.headers.get("Location")) {