@tanstack/react-router 0.0.1-beta.243 → 0.0.1-beta.244
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/link.js +4 -3
- package/build/cjs/link.js.map +1 -1
- package/build/esm/index.js +4 -3
- package/build/esm/index.js.map +1 -1
- package/build/stats-html.html +1 -1
- package/build/stats-react.json +355 -355
- package/build/umd/index.development.js +4 -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 +2 -2
- package/src/link.tsx +3 -2
|
@@ -1610,8 +1610,9 @@
|
|
|
1610
1610
|
const {
|
|
1611
1611
|
buildLink
|
|
1612
1612
|
} = useRouter();
|
|
1613
|
-
const
|
|
1614
|
-
strict: false
|
|
1613
|
+
const matchPathname = useMatch({
|
|
1614
|
+
strict: false,
|
|
1615
|
+
select: s => s.pathname
|
|
1615
1616
|
});
|
|
1616
1617
|
const {
|
|
1617
1618
|
// custom props
|
|
@@ -1646,7 +1647,7 @@
|
|
|
1646
1647
|
...rest
|
|
1647
1648
|
} = options;
|
|
1648
1649
|
const linkInfo = buildLink({
|
|
1649
|
-
from: options.to ?
|
|
1650
|
+
from: options.to ? matchPathname : undefined,
|
|
1650
1651
|
...options
|
|
1651
1652
|
});
|
|
1652
1653
|
if (linkInfo.type === 'external') {
|