@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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tanstack/router-core",
3
3
  "author": "Tanner Linsley",
4
- "version": "0.0.1-beta.186",
4
+ "version": "0.0.1-beta.188",
5
5
  "license": "MIT",
6
6
  "repository": "tanstack/router",
7
7
  "homepage": "https://tanstack.com/router",
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(from.pathname, from.search)
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
- const foundMask = this.options.routeMasks?.find((d) => {
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
- return match
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
  }