Open cs-clarence opened 2 weeks ago
Likely it's because the server has already responded at the point that it resolves. If there is no async in your components then the server is going to thing it is done (or at least can stream the first chunk).. in which case by the time it tries to process the redirect it thinks it is done. There might be still a timing bug/missing guard here but we probably need to find a reproduction that reads the routes data.
Describe the bug
Given this code:
When returning a redirect from a cache function, this error occurs:
When throwing a redirect:
Your Example Website or App
https://stackblitz.com/edit/github-3nqamc?file=src%2Froutes%2Findex.tsx
Steps to Reproduce the Bug or Issue
Expected behavior
Returning/throwing a redirect in a cache function should redirect
Screenshots or Videos
No response
Platform
Additional context
No response