Skip to content

Commit 6f6766a

Browse files
authored
Fix prerender tags when notFound is called (#74577) (#74607)
This backports #74577 which ensures we don't lose tags added to a page before notFound() is called.
1 parent a46f27f commit 6f6766a

File tree

3 files changed

+1986
-1850
lines changed

3 files changed

+1986
-1850
lines changed

packages/next/src/server/app-render/app-render.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3777,7 +3777,7 @@ async function prerenderToStream(
37773777
revalidate: INFINITE_CACHE,
37783778
expire: INFINITE_CACHE,
37793779
stale: INFINITE_CACHE,
3780-
tags: [...implicitTags],
3780+
tags: [...(prerenderStore?.tags || implicitTags)],
37813781
})
37823782
const errorRSCPayload = await workUnitAsyncStorage.run(
37833783
prerenderLegacyStore,

0 commit comments

Comments
 (0)