next.js
fcd146c9 - Do not invoke server actions twice when `dynamicIO` is enabled (#70784)

Commit
1 year ago
Do not invoke server actions twice when `dynamicIO` is enabled (#70784) In dev mode, when dynamic IO is enabled, we seed a prefetch cache scope for non-prefetch requests (via #70408). We must omit server action requests from this cache seeding though, because it would lead to the action handler being called twice. This is not intended in general for any action, and specificially fails in the second invocation while decoding the request form data with `Error: Unexpected end of JSON input` in `initializeModelChunk`, because the request body was already consumed in the first invocation.
Author
Parents
Loading