mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
This modifies the patched fetch implementation to better handle when called within an `unstable_cache` callback. In these callbacks, it should not throw an error related to dynamic access. This replaces the verbose `trackDynamicFetch` instead with `markCurrentScopeAsDynamic` which already has support for checking if inside an unstable cache context. It also has been adjusted to be a no-op when `export const dynamic = "force-static"`, further simplifying the code within the patch fetch implementation.