@tanstack/react-router 1.56.5 → 1.57.7

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