@tanstack/router-core 1.171.22 → 1.171.24

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.
@@ -345,34 +345,25 @@ var RouterCore = class {
345
345
  unmaskOnReload: dest.unmaskOnReload
346
346
  };
347
347
  };
348
- const buildWithMatches = (dest = {}, maskedDest) => {
349
- const next = build(dest);
350
- let maskedNext = maskedDest ? build(maskedDest) : void 0;
351
- if (!maskedNext) {
352
- const params = Object.create(null);
353
- if (this.options.routeMasks) {
354
- const match = require_new_process_route_tree.findFlatMatch(next.pathname, this.processedTree);
355
- if (match) {
356
- Object.assign(params, match.rawParams);
357
- const { from: _from, params: maskParams, ...maskProps } = match.route;
358
- const nextParams = resolveNextParams(maskParams, params);
359
- maskedDest = {
360
- from: opts.from,
361
- ...maskProps,
362
- params: nextParams
363
- };
364
- maskedNext = build(maskedDest);
365
- }
366
- }
367
- }
368
- if (maskedNext) next.maskedLocation = maskedNext;
369
- return next;
370
- };
371
- if (opts.mask) return buildWithMatches(opts, {
348
+ const next = build(opts);
349
+ if (opts.mask) next.maskedLocation = build({
372
350
  from: opts.from,
373
351
  ...opts.mask
374
352
  });
375
- return buildWithMatches(opts);
353
+ else if (this.options.routeMasks) {
354
+ const match = require_new_process_route_tree.findFlatMatch(next.pathname, this.processedTree);
355
+ if (match) {
356
+ const params = Object.assign(Object.create(null), match.rawParams);
357
+ const { from: _from, params: maskParams, ...maskProps } = match.route;
358
+ const nextParams = resolveNextParams(maskParams, params);
359
+ next.maskedLocation = build({
360
+ from: opts.from,
361
+ ...maskProps,
362
+ params: nextParams
363
+ });
364
+ }
365
+ }
366
+ return next;
376
367
  };
377
368
  this.commitLocation = async ({ viewTransition, ignoreBlocker, ...next }) => {
378
369
  let historyAction;