next.js
b42f73aa - fix: server action redirects between multiple root layouts (#73063)

Commit
1 year ago
fix: server action redirects between multiple root layouts (#73063) When handling a redirect through a server action, we pass in the current href rather than the destination href to `handleExternalUrl`, which is incorrect since that won't reflect the updated URL from a server action's redirect response. While looking into this, I noticed a handful of server action branches that weren't properly rejecting or resolving the action promises. This would cause the transitions to stall until they were fulfilled, so I updated all of the existing branches where we early return to also resolve the promise. Fixes #72842
Author
Parents
Loading