@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/build/esm/index.js
CHANGED
|
@@ -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(
|
|
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
|
-
|
|
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
|
-
|
|
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
|
}
|