@tanstack/router-core 1.142.13 → 1.143.3
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 +6 -2
- package/dist/cjs/router.cjs.map +1 -1
- package/dist/esm/router.js +6 -2
- package/dist/esm/router.js.map +1 -1
- package/package.json +1 -1
- package/src/router.ts +25 -2
package/dist/cjs/router.cjs
CHANGED
|
@@ -208,11 +208,15 @@ class RouterCore {
|
|
|
208
208
|
const searchStr = this.options.stringifySearch(parsedSearch);
|
|
209
209
|
url.search = searchStr;
|
|
210
210
|
const fullPath = url.href.replace(url.origin, "");
|
|
211
|
+
const internalPathname = url.pathname;
|
|
212
|
+
const urlForOutput = new URL(url.href);
|
|
213
|
+
const rewrittenUrl = rewrite.executeRewriteOutput(this.rewrite, urlForOutput);
|
|
214
|
+
const publicHref = rewrittenUrl.pathname + rewrittenUrl.search + rewrittenUrl.hash;
|
|
211
215
|
return {
|
|
212
216
|
href: fullPath,
|
|
213
|
-
publicHref
|
|
217
|
+
publicHref,
|
|
214
218
|
url,
|
|
215
|
-
pathname: utils.decodePath(
|
|
219
|
+
pathname: utils.decodePath(internalPathname),
|
|
216
220
|
searchStr,
|
|
217
221
|
search: utils.replaceEqualDeep(previousLocation?.search, parsedSearch),
|
|
218
222
|
hash: url.hash.split("#").reverse()[0] ?? "",
|