@tanstack/router-core 0.0.1-beta.186 → 0.0.1-beta.188
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/build/cjs/router.js +9 -3
- package/build/cjs/router.js.map +1 -1
- package/build/esm/index.js +9 -3
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +124 -124
- package/build/umd/index.development.js +9 -3
- package/build/umd/index.development.js.map +1 -1
- package/build/umd/index.production.js +1 -1
- package/build/umd/index.production.js.map +1 -1
- package/package.json +1 -1
- package/src/router.ts +10 -3
package/package.json
CHANGED
package/src/router.ts
CHANGED
|
@@ -1679,7 +1679,7 @@ export class Router<
|
|
|
1679
1679
|
`${dest.to ?? ''}`,
|
|
1680
1680
|
)
|
|
1681
1681
|
|
|
1682
|
-
const fromMatches = this.matchRoutes(
|
|
1682
|
+
const fromMatches = this.matchRoutes(fromPathname, from.search)
|
|
1683
1683
|
|
|
1684
1684
|
const prevParams = { ...last(fromMatches)?.params }
|
|
1685
1685
|
|
|
@@ -1778,20 +1778,27 @@ export class Router<
|
|
|
1778
1778
|
let maskedNext = maskedDest ? build(maskedDest) : undefined
|
|
1779
1779
|
|
|
1780
1780
|
if (!maskedNext) {
|
|
1781
|
-
|
|
1781
|
+
let params = {}
|
|
1782
|
+
|
|
1783
|
+
let foundMask = this.options.routeMasks?.find((d) => {
|
|
1782
1784
|
const match = matchPathname(this.basepath, next.pathname, {
|
|
1783
1785
|
to: d.from,
|
|
1784
1786
|
fuzzy: false,
|
|
1785
1787
|
})
|
|
1786
1788
|
|
|
1787
1789
|
if (match) {
|
|
1788
|
-
|
|
1790
|
+
params = match
|
|
1791
|
+
return true
|
|
1789
1792
|
}
|
|
1790
1793
|
|
|
1791
1794
|
return false
|
|
1792
1795
|
})
|
|
1793
1796
|
|
|
1794
1797
|
if (foundMask) {
|
|
1798
|
+
foundMask = {
|
|
1799
|
+
...foundMask,
|
|
1800
|
+
from: interpolatePath(foundMask.from, params) as any,
|
|
1801
|
+
}
|
|
1795
1802
|
maskedDest = foundMask
|
|
1796
1803
|
maskedNext = build(maskedDest)
|
|
1797
1804
|
}
|