Skip to content

Commit

Permalink
Fix prerender tags when notFound is called (#74577) (#74607)
Browse files Browse the repository at this point in the history
This backports #74577 which ensures we don't lose tags added to a page
before notFound() is called.
  • Loading branch information
ijjk authored Jan 7, 2025
1 parent a46f27f commit 6f6766a
Show file tree
Hide file tree
Showing 3 changed files with 1,986 additions and 1,850 deletions.
2 changes: 1 addition & 1 deletion packages/next/src/server/app-render/app-render.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3777,7 +3777,7 @@ async function prerenderToStream(
revalidate: INFINITE_CACHE,
expire: INFINITE_CACHE,
stale: INFINITE_CACHE,
tags: [...implicitTags],
tags: [...(prerenderStore?.tags || implicitTags)],
})
const errorRSCPayload = await workUnitAsyncStorage.run(
prerenderLegacyStore,
Expand Down
Loading

0 comments on commit 6f6766a

Please sign in to comment.