@tanstack/router-core 1.157.8 → 1.157.9
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/dist/cjs/router.cjs +4 -1
- package/dist/cjs/router.cjs.map +1 -1
- package/dist/esm/router.js +4 -1
- package/dist/esm/router.js.map +1 -1
- package/package.json +1 -1
- package/src/router.ts +11 -6
package/package.json
CHANGED
package/src/router.ts
CHANGED
|
@@ -1805,6 +1805,7 @@ export class RouterCore<
|
|
|
1805
1805
|
const interpolatedNextTo = interpolatePath({
|
|
1806
1806
|
path: nextTo,
|
|
1807
1807
|
params: nextParams,
|
|
1808
|
+
decoder: this.pathParamsDecoder,
|
|
1808
1809
|
server: this.isServer,
|
|
1809
1810
|
}).interpolatedPath
|
|
1810
1811
|
|
|
@@ -1833,11 +1834,13 @@ export class RouterCore<
|
|
|
1833
1834
|
}
|
|
1834
1835
|
|
|
1835
1836
|
// If there are any params, we need to stringify them
|
|
1837
|
+
let changedParams = false
|
|
1836
1838
|
if (Object.keys(nextParams).length > 0) {
|
|
1837
1839
|
for (const route of destRoutes) {
|
|
1838
1840
|
const fn =
|
|
1839
1841
|
route.options.params?.stringify ?? route.options.stringifyParams
|
|
1840
1842
|
if (fn) {
|
|
1843
|
+
changedParams = true
|
|
1841
1844
|
Object.assign(nextParams, fn(nextParams))
|
|
1842
1845
|
}
|
|
1843
1846
|
}
|
|
@@ -1848,12 +1851,14 @@ export class RouterCore<
|
|
|
1848
1851
|
// This preserves the original parameter syntax including optional parameters
|
|
1849
1852
|
nextTo
|
|
1850
1853
|
: decodePath(
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1854
|
+
!changedParams
|
|
1855
|
+
? interpolatedNextTo
|
|
1856
|
+
: interpolatePath({
|
|
1857
|
+
path: nextTo,
|
|
1858
|
+
params: nextParams,
|
|
1859
|
+
decoder: this.pathParamsDecoder,
|
|
1860
|
+
server: this.isServer,
|
|
1861
|
+
}).interpolatedPath,
|
|
1857
1862
|
)
|
|
1858
1863
|
|
|
1859
1864
|
// Resolve the next search
|