next.js
0c3aa188 - Fix: External redirect swallowed by Next.js (#87121)

Commit
9 days ago
Fix: External redirect swallowed by Next.js (#87121) Fix for a regression introduced by https://github.com/vercel/next.js/pull/86367. When a Server Action performed an external redirect, Next.js was no longer triggering an MPA navigation from directly inside the response handler. It would end up working regardless if the Server Action was called from a React action, like a form action or useTransition hook, because the Server Action would rethrow the redirect error and trigger a "late" redirect during rendering. But if the Server Action was called from outside of a React scope — onClick, for example — it would do nothing.
Author
Parents
Loading