Skip to content

Commit afbe97a

Browse files
reduce
1 parent 60932dd commit afbe97a

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎packages/react-router/src/Match.tsx‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -444,8 +444,10 @@ export const MatchInner = React.memo(function MatchInnerImpl({
444444
const suspendOrKeepPending = (
445445
key: 'displayPendingPromise' | 'minPendingPromise' | 'loadPromise',
446446
) => {
447+
const routerMatch = router.getMatch(match.id)
448+
447449
const promise =
448-
router.getMatch(match.id)?._nonReactive[key] ??
450+
routerMatch?._nonReactive[key] ??
449451
match._nonReactive[key] ??
450452
router.latestLoadPromise
451453

@@ -454,7 +456,7 @@ export const MatchInner = React.memo(function MatchInnerImpl({
454456
}
455457

456458
const retainedPendingPromise =
457-
router.getMatch(match.id)?._nonReactive.retainedPendingPromise ??
459+
routerMatch?._nonReactive.retainedPendingPromise ??
458460
match._nonReactive.retainedPendingPromise
459461

460462
if (retainedPendingPromise) {

0 commit comments

Comments
 (0)