@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/package.json
CHANGED
package/src/router.ts
CHANGED
|
@@ -1563,7 +1563,18 @@ export class RouterCore<
|
|
|
1563
1563
|
}
|
|
1564
1564
|
|
|
1565
1565
|
cancelMatches = () => {
|
|
1566
|
-
this.state.
|
|
1566
|
+
const currentPendingMatches = this.state.matches.filter(
|
|
1567
|
+
(match) => match.status === 'pending',
|
|
1568
|
+
)
|
|
1569
|
+
const currentLoadingMatches = this.state.matches.filter(
|
|
1570
|
+
(match) => match.isFetching === 'loader',
|
|
1571
|
+
)
|
|
1572
|
+
const matchesToCancelArray = new Set([
|
|
1573
|
+
...(this.state.pendingMatches ?? []),
|
|
1574
|
+
...currentPendingMatches,
|
|
1575
|
+
...currentLoadingMatches,
|
|
1576
|
+
])
|
|
1577
|
+
matchesToCancelArray.forEach((match) => {
|
|
1567
1578
|
this.cancelMatch(match.id)
|
|
1568
1579
|
})
|
|
1569
1580
|
}
|