@tanstack/router-core 1.134.13 → 1.134.15
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 +12 -1
- package/dist/cjs/router.cjs.map +1 -1
- package/dist/esm/router.js +12 -1
- package/dist/esm/router.js.map +1 -1
- package/package.json +1 -1
- package/src/router.ts +12 -1
package/dist/cjs/router.cjs
CHANGED
|
@@ -271,7 +271,18 @@ class RouterCore {
|
|
|
271
271
|
match._nonReactive.pendingTimeout = void 0;
|
|
272
272
|
};
|
|
273
273
|
this.cancelMatches = () => {
|
|
274
|
-
this.state.
|
|
274
|
+
const currentPendingMatches = this.state.matches.filter(
|
|
275
|
+
(match) => match.status === "pending"
|
|
276
|
+
);
|
|
277
|
+
const currentLoadingMatches = this.state.matches.filter(
|
|
278
|
+
(match) => match.isFetching === "loader"
|
|
279
|
+
);
|
|
280
|
+
const matchesToCancelArray = /* @__PURE__ */ new Set([
|
|
281
|
+
...this.state.pendingMatches ?? [],
|
|
282
|
+
...currentPendingMatches,
|
|
283
|
+
...currentLoadingMatches
|
|
284
|
+
]);
|
|
285
|
+
matchesToCancelArray.forEach((match) => {
|
|
275
286
|
this.cancelMatch(match.id);
|
|
276
287
|
});
|
|
277
288
|
};
|