Skip to content

Commit 5bb291b

Browse files
committed
is it the non reactive update order?
1 parent 2b5ee89 commit 5bb291b

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

‎packages/router-core/src/router.ts‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2687,10 +2687,13 @@ export class RouterCore<
26872687
const head = await executeHead()
26882688

26892689
if (head) {
2690-
updateMatch(matchId, (prev) => ({
2691-
...prev,
2692-
...head,
2693-
}))
2690+
updateMatch(matchId, (prev) => {
2691+
prev._nonReactive.loaderPromise = undefined
2692+
return {
2693+
...prev,
2694+
...head,
2695+
}
2696+
})
26942697
}
26952698
const match = this.getMatch(matchId)!
26962699
match._nonReactive.loaderPromise = undefined

0 commit comments

Comments
 (0)