Skip to content

Commit 7d62f47

Browse files
committed
fix(router-core): fix handle AbortError logic
Signed-off-by: leesb971204 <[email protected]>
1 parent bd633ce commit 7d62f47

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -699,12 +699,11 @@ const runLoader = async (
699699
} catch (e) {
700700
let error = e
701701

702-
if (error instanceof DOMException && error.name === 'AbortError') {
703-
const head = await executeHead(inner, matchId, route)
702+
if ((error as any)?.name === 'AbortError') {
704703
inner.updateMatch(matchId, (prev) => ({
705704
...prev,
706705
status: prev.status === 'pending' ? 'success' : prev.status,
707-
...head,
706+
isFetching: false,
708707
}))
709708
return
710709
}

0 commit comments

Comments
 (0)