@tanstack/react-router 1.56.4 → 1.57.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.
@@ -552,10 +552,13 @@ class Router {
552
552
  }
553
553
  };
554
554
  this.startViewTransition = (fn) => {
555
- var _a, _b;
556
555
  const shouldViewTransition = this.shouldViewTransition ?? this.options.defaultViewTransition;
557
556
  delete this.shouldViewTransition;
558
- ((_b = (_a = shouldViewTransition && typeof document !== "undefined" ? document : void 0) == null ? void 0 : _a.startViewTransition) == null ? void 0 : _b.call(_a, fn)) || fn();
557
+ if (shouldViewTransition && typeof document !== "undefined" && "startViewTransition" in document && typeof document.startViewTransition === "function") {
558
+ document.startViewTransition(fn);
559
+ } else {
560
+ fn();
561
+ }
559
562
  };
560
563
  this.updateMatch = (id, updater) => {
561
564
  var _a;