@tanstack/router-core 0.0.1-beta.186 → 0.0.1-beta.187

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.
@@ -1716,7 +1716,7 @@ class Router {
1716
1716
  const from = this.state.location;
1717
1717
  const fromPathname = dest.from ?? from.pathname;
1718
1718
  let pathname = resolvePath(this.basepath ?? '/', fromPathname, `${dest.to ?? ''}`);
1719
- const fromMatches = this.matchRoutes(from.pathname, from.search);
1719
+ const fromMatches = this.matchRoutes(fromPathname, from.search);
1720
1720
  const prevParams = {
1721
1721
  ...last(fromMatches)?.params
1722
1722
  };
@@ -1764,17 +1764,23 @@ class Router {
1764
1764
  let next = build(dest);
1765
1765
  let maskedNext = maskedDest ? build(maskedDest) : undefined;
1766
1766
  if (!maskedNext) {
1767
- const foundMask = this.options.routeMasks?.find(d => {
1767
+ let params = {};
1768
+ let foundMask = this.options.routeMasks?.find(d => {
1768
1769
  const match = matchPathname(this.basepath, next.pathname, {
1769
1770
  to: d.from,
1770
1771
  fuzzy: false
1771
1772
  });
1772
1773
  if (match) {
1773
- return match;
1774
+ params = match;
1775
+ return true;
1774
1776
  }
1775
1777
  return false;
1776
1778
  });
1777
1779
  if (foundMask) {
1780
+ foundMask = {
1781
+ ...foundMask,
1782
+ from: interpolatePath(foundMask.from, params)
1783
+ };
1778
1784
  maskedDest = foundMask;
1779
1785
  maskedNext = build(maskedDest);
1780
1786
  }