@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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/react-router",
3
- "version": "1.56.5",
3
+ "version": "1.57.7",
4
4
  "description": "Modern and scalable routing for React applications",
5
5
  "author": "Tanner Linsley",
6
6
  "license": "MIT",
@@ -52,7 +52,7 @@
52
52
  "@tanstack/react-store": "^0.5.5",
53
53
  "tiny-invariant": "^1.3.3",
54
54
  "tiny-warning": "^1.0.3",
55
- "@tanstack/history": "1.51.7"
55
+ "@tanstack/history": "1.57.6"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@testing-library/jest-dom": "^6.4.8",
@@ -66,7 +66,7 @@
66
66
  "peerDependencies": {
67
67
  "react": ">=18",
68
68
  "react-dom": ">=18",
69
- "@tanstack/router-generator": "1.56.4"
69
+ "@tanstack/router-generator": "1.57.7"
70
70
  },
71
71
  "peerDependenciesMeta": {
72
72
  "@tanstack/react-generator": {
package/src/router.ts CHANGED
@@ -1816,12 +1816,16 @@ export class Router<
1816
1816
  // Reset the view transition flag
1817
1817
  delete this.shouldViewTransition
1818
1818
  // Attempt to start a view transition (or just apply the changes if we can't)
1819
- ;(shouldViewTransition && typeof document !== 'undefined'
1820
- ? document
1821
- : undefined
1822
- )
1823
- // @ts-expect-error
1824
- ?.startViewTransition?.(fn) || fn()
1819
+ if (
1820
+ shouldViewTransition &&
1821
+ typeof document !== 'undefined' &&
1822
+ 'startViewTransition' in document &&
1823
+ typeof document.startViewTransition === 'function'
1824
+ ) {
1825
+ document.startViewTransition(fn)
1826
+ } else {
1827
+ fn()
1828
+ }
1825
1829
  }
1826
1830
 
1827
1831
  updateMatch = (