From 3cd05fbc64be2ed05d14e4984d5b861208c2500c Mon Sep 17 00:00:00 2001 From: Zack Tanner Date: Thu, 25 Jan 2024 16:51:37 -0800 Subject: [PATCH] remove unnecessary PPR branch in non-PPR reducer --- .../router-reducer/reducers/navigate-reducer.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/next/src/client/components/router-reducer/reducers/navigate-reducer.ts b/packages/next/src/client/components/router-reducer/reducers/navigate-reducer.ts index f135b730a2d3c..91b0785b29d38 100644 --- a/packages/next/src/client/components/router-reducer/reducers/navigate-reducer.ts +++ b/packages/next/src/client/components/router-reducer/reducers/navigate-reducer.ts @@ -166,7 +166,7 @@ function navigateReducer_noPPR( prefetchQueue.bump(data!) return data!.then( - ([flightData, canonicalUrlOverride, postponed]) => { + ([flightData, canonicalUrlOverride]) => { // we only want to mark this once if (prefetchValues && !prefetchValues.lastUsedTime) { // important: we should only mark the cache node as dirty after we unsuspend from the call above @@ -226,11 +226,8 @@ function navigateReducer_noPPR( ) if ( - (!applied && - prefetchEntryCacheStatus === PrefetchCacheEntryStatus.stale) || - // TODO-APP: If the prefetch was postponed, we don't want to apply it - // until we land router changes to handle the postponed case. - postponed + !applied && + prefetchEntryCacheStatus === PrefetchCacheEntryStatus.stale ) { applied = addRefetchToLeafSegments( cache,