@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/esm/router.js
CHANGED
|
@@ -515,7 +515,9 @@ class RouterCore {
|
|
|
515
515
|
const parsed = parseHref(href, {
|
|
516
516
|
__TSR_index: replace ? currentIndex : currentIndex + 1
|
|
517
517
|
});
|
|
518
|
-
|
|
518
|
+
const hrefUrl = new URL(parsed.pathname, this.origin);
|
|
519
|
+
const rewrittenUrl = executeRewriteInput(this.rewrite, hrefUrl);
|
|
520
|
+
rest.to = rewrittenUrl.pathname;
|
|
519
521
|
rest.search = this.options.parseSearch(parsed.search);
|
|
520
522
|
rest.hash = parsed.hash.slice(1);
|
|
521
523
|
}
|
|
@@ -558,7 +560,7 @@ class RouterCore {
|
|
|
558
560
|
reloadDocument = true;
|
|
559
561
|
}
|
|
560
562
|
if (reloadDocument) {
|
|
561
|
-
if (
|
|
563
|
+
if (to !== void 0 || !href) {
|
|
562
564
|
const location = this.buildLocation({ to, ...rest });
|
|
563
565
|
href = href ?? location.url.href;
|
|
564
566
|
publicHref = publicHref ?? location.url.href;
|