@tanstack/router-core 1.146.0 → 1.146.1
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/dist/cjs/router.cjs +4 -2
- package/dist/cjs/router.cjs.map +1 -1
- package/dist/esm/router.js +4 -2
- package/dist/esm/router.js.map +1 -1
- package/package.json +1 -1
- package/src/router.ts +15 -2
package/dist/cjs/router.cjs
CHANGED
|
@@ -517,7 +517,9 @@ class RouterCore {
|
|
|
517
517
|
const parsed = history.parseHref(href, {
|
|
518
518
|
__TSR_index: replace ? currentIndex : currentIndex + 1
|
|
519
519
|
});
|
|
520
|
-
|
|
520
|
+
const hrefUrl = new URL(parsed.pathname, this.origin);
|
|
521
|
+
const rewrittenUrl = rewrite.executeRewriteInput(this.rewrite, hrefUrl);
|
|
522
|
+
rest.to = rewrittenUrl.pathname;
|
|
521
523
|
rest.search = this.options.parseSearch(parsed.search);
|
|
522
524
|
rest.hash = parsed.hash.slice(1);
|
|
523
525
|
}
|
|
@@ -560,7 +562,7 @@ class RouterCore {
|
|
|
560
562
|
reloadDocument = true;
|
|
561
563
|
}
|
|
562
564
|
if (reloadDocument) {
|
|
563
|
-
if (
|
|
565
|
+
if (to !== void 0 || !href) {
|
|
564
566
|
const location = this.buildLocation({ to, ...rest });
|
|
565
567
|
href = href ?? location.url.href;
|
|
566
568
|
publicHref = publicHref ?? location.url.href;
|