@tanstack/react-router 1.33.4 → 1.33.7

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/src/router.ts CHANGED
@@ -1717,13 +1717,13 @@ export class Router<
1717
1717
  handleRedirectAndNotFound(match, err)
1718
1718
  }
1719
1719
 
1720
- matches[index] = match = {
1720
+ matches[index] = match = updateMatch(match.id, () => ({
1721
1721
  ...match,
1722
1722
  error: err,
1723
1723
  status: 'error',
1724
1724
  updatedAt: Date.now(),
1725
1725
  abortController: new AbortController(),
1726
- }
1726
+ }))
1727
1727
  }
1728
1728
 
1729
1729
  if (match.paramsError) {
@@ -1739,13 +1739,12 @@ export class Router<
1739
1739
  parentMatch?.context ?? this.options.context ?? {}
1740
1740
 
1741
1741
  // Make sure the match has parent context set before going further
1742
- matches[index] = match = updateMatch(match.id, (prev) => ({
1743
- ...prev,
1742
+ matches[index] = match = updateMatch(match.id, () => ({
1743
+ ...match,
1744
1744
  routeContext: replaceEqualDeep(
1745
1745
  match.routeContext,
1746
1746
  parentContext,
1747
1747
  ),
1748
- context: replaceEqualDeep(match.context, parentContext),
1749
1748
  abortController,
1750
1749
  }))
1751
1750