@tanstack/router-core 1.130.5 → 1.130.6

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.
@@ -691,23 +691,16 @@ class RouterCore {
691
691
  };
692
692
  this.updateMatch = (id, updater) => {
693
693
  var _a;
694
- let updated;
695
- const isPending = (_a = this.state.pendingMatches) == null ? void 0 : _a.find((d) => d.id === id);
696
- const isMatched = this.state.matches.find((d) => d.id === id);
697
- const isCached = this.state.cachedMatches.find((d) => d.id === id);
698
- const matchesKey = isPending ? "pendingMatches" : isMatched ? "matches" : isCached ? "cachedMatches" : "";
694
+ const matchesKey = ((_a = this.state.pendingMatches) == null ? void 0 : _a.some((d) => d.id === id)) ? "pendingMatches" : this.state.matches.some((d) => d.id === id) ? "matches" : this.state.cachedMatches.some((d) => d.id === id) ? "cachedMatches" : "";
699
695
  if (matchesKey) {
700
696
  this.__store.setState((s) => {
701
697
  var _a2;
702
698
  return {
703
699
  ...s,
704
- [matchesKey]: (_a2 = s[matchesKey]) == null ? void 0 : _a2.map(
705
- (d) => d.id === id ? updated = updater(d) : d
706
- )
700
+ [matchesKey]: (_a2 = s[matchesKey]) == null ? void 0 : _a2.map((d) => d.id === id ? updater(d) : d)
707
701
  };
708
702
  });
709
703
  }
710
- return updated;
711
704
  };
712
705
  this.getMatch = (matchId) => {
713
706
  var _a;