Skip to content

Commit fe255da

Browse files
committed
make more targetted loading
1 parent 0968563 commit fe255da

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -673,8 +673,8 @@ const runLoader = async (
673673
const pendingPromise = match._nonReactive.minPendingPromise
674674
if (pendingPromise) await pendingPromise
675675

676-
if (route._componentsPromise) {
677-
await route._componentsPromise
676+
if (isNotFound(e)) {
677+
await (route.options.notFoundComponent as any)?.preload?.()
678678
}
679679

680680
handleRedirectAndNotFound(inner, inner.router.getMatch(matchId), e)

0 commit comments

Comments
 (0)