@tanstack/react-router 1.102.3 → 1.104.0

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.102.3",
3
+ "version": "1.104.0",
4
4
  "description": "Modern and scalable routing for React applications",
5
5
  "author": "Tanner Linsley",
6
6
  "license": "MIT",
@@ -53,8 +53,8 @@
53
53
  "jsesc": "^3.1.0",
54
54
  "tiny-invariant": "^1.3.3",
55
55
  "tiny-warning": "^1.0.3",
56
- "@tanstack/history": "1.99.13",
57
- "@tanstack/router-core": "^1.102.0"
56
+ "@tanstack/router-core": "^1.102.5",
57
+ "@tanstack/history": "1.99.13"
58
58
  },
59
59
  "devDependencies": {
60
60
  "@testing-library/jest-dom": "^6.6.3",
package/src/router.ts CHANGED
@@ -1491,7 +1491,9 @@ export class Router<
1491
1491
  )
1492
1492
  let pathname: string
1493
1493
  if (dest.to) {
1494
- pathname = this.resolvePathWithBase(fromPath, `${dest.to}`)
1494
+ const resolvePathTo =
1495
+ fromMatch?.fullPath || this.latestLocation.pathname
1496
+ pathname = this.resolvePathWithBase(resolvePathTo, `${dest.to}`)
1495
1497
  } else {
1496
1498
  const fromRouteByFromPathRouteId =
1497
1499
  this.routesById[