next.js
45150fc7 - [after] fix: execute revalidates added within unstable_after() (#70458)

Commit
1 year ago
[after] fix: execute revalidates added within unstable_after() (#70458) ### What? Execute revalidations (written into `staticGenerationStore.{revalidatedTags,pendingRevalidates,pendingRevalidateWrites}`) that were added during `unstable_after` callbacks. ### Why? Previously, if `revalidatePath`/`revalidateTag` were called in an `unstable_after` callback, nothing would happen. I missed the fact that other codepaths (app-render, action-handler, app-route) all [manually call `staticGenerationStore.incrementalCache.revalidateTag`](https://github.com/vercel/next.js/blob/79f4490b0abda3fa7129c49b402dbadf6eadd79e/packages/next/src/server/app-render/app-render.tsx#L1072-L1080) to actually perform revalidations scheduled via `revalidatePath`/`revalidateTag`, and `after-context` wasn't doing that, so nothing was happening.
Author
Parents
Loading