@tanstack/solid-router 1.112.7 → 1.112.9
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 -6
- package/dist/cjs/router.cjs.map +1 -1
- package/dist/esm/router.js +6 -6
- package/dist/esm/router.js.map +1 -1
- package/dist/source/router.js +3 -1
- package/dist/source/router.js.map +1 -1
- package/package.json +3 -3
- package/src/router.ts +3 -1
package/dist/esm/router.js
CHANGED
|
@@ -300,7 +300,7 @@ class Router {
|
|
|
300
300
|
};
|
|
301
301
|
this.buildLocation = (opts) => {
|
|
302
302
|
const build = (dest = {}, matchedRoutesResult) => {
|
|
303
|
-
var _a, _b, _c, _d, _e, _f;
|
|
303
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
304
304
|
const fromMatches = dest._fromLocation ? this.matchRoutes(dest._fromLocation, { _buildLocation: true }) : this.state.matches;
|
|
305
305
|
const fromMatch = dest.from != null ? fromMatches.find(
|
|
306
306
|
(d) => matchPathname(this.basepath, trimPathRight(d.pathname), {
|
|
@@ -320,10 +320,10 @@ class Router {
|
|
|
320
320
|
);
|
|
321
321
|
let pathname;
|
|
322
322
|
if (dest.to) {
|
|
323
|
-
const resolvePathTo = (fromMatch == null ? void 0 : fromMatch.fullPath) || this.latestLocation.pathname;
|
|
323
|
+
const resolvePathTo = (fromMatch == null ? void 0 : fromMatch.fullPath) || ((_d = last(fromMatches)) == null ? void 0 : _d.fullPath) || this.latestLocation.pathname;
|
|
324
324
|
pathname = this.resolvePathWithBase(resolvePathTo, `${dest.to}`);
|
|
325
325
|
} else {
|
|
326
|
-
const fromRouteByFromPathRouteId = this.routesById[(
|
|
326
|
+
const fromRouteByFromPathRouteId = this.routesById[(_e = stayingMatches == null ? void 0 : stayingMatches.find((route) => {
|
|
327
327
|
const interpolatedPath = interpolatePath({
|
|
328
328
|
path: route.fullPath,
|
|
329
329
|
params: (matchedRoutesResult == null ? void 0 : matchedRoutesResult.routeParams) ?? {},
|
|
@@ -331,13 +331,13 @@ class Router {
|
|
|
331
331
|
}).interpolatedPath;
|
|
332
332
|
const pathname2 = joinPaths([this.basepath, interpolatedPath]);
|
|
333
333
|
return pathname2 === fromPath;
|
|
334
|
-
})) == null ? void 0 :
|
|
334
|
+
})) == null ? void 0 : _e.id];
|
|
335
335
|
pathname = this.resolvePathWithBase(
|
|
336
336
|
fromPath,
|
|
337
337
|
(fromRouteByFromPathRouteId == null ? void 0 : fromRouteByFromPathRouteId.to) ?? fromPath
|
|
338
338
|
);
|
|
339
339
|
}
|
|
340
|
-
const prevParams = { ...(
|
|
340
|
+
const prevParams = { ...(_f = last(fromMatches)) == null ? void 0 : _f.params };
|
|
341
341
|
let nextParams = (dest.params ?? true) === true ? prevParams : {
|
|
342
342
|
...prevParams,
|
|
343
343
|
...functionalUpdate(dest.params, prevParams)
|
|
@@ -358,7 +358,7 @@ class Router {
|
|
|
358
358
|
decodeCharMap: this.pathParamsDecodeCharMap
|
|
359
359
|
}).interpolatedPath;
|
|
360
360
|
let search = fromSearch;
|
|
361
|
-
if (opts._includeValidateSearch && ((
|
|
361
|
+
if (opts._includeValidateSearch && ((_g = this.options.search) == null ? void 0 : _g.strict)) {
|
|
362
362
|
let validatedSearch = {};
|
|
363
363
|
matchedRoutesResult == null ? void 0 : matchedRoutesResult.matchedRoutes.forEach((route) => {
|
|
364
364
|
try {
|