@tanstack/router-devtools 1.4.1 → 1.4.3

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.
@@ -326,7 +326,7 @@
326
326
  function useRouter(opts) {
327
327
  const resolvedContext = typeof document !== 'undefined' ? window.__TSR_ROUTER_CONTEXT__ || routerContext : routerContext;
328
328
  const value = React__namespace.useContext(resolvedContext);
329
- warning(opts?.warn && value, 'useRouter must be used inside a <RouterProvider> component!');
329
+ warning(!((opts?.warn ?? true) && !value), 'useRouter must be used inside a <RouterProvider> component!');
330
330
  return value;
331
331
  }
332
332
  function trimPathLeft(path) {