-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Single Fetch: Can't return empty Map or Set from loader (turbo-stream issue?) #9495
Comments
There is a change for this in turbo-stream release 2.1.0. |
This should be resolved by #9562 and available in the next release |
🤖 Hello there, We just published version Thanks! |
🤖 Hello there, We just published version Thanks! |
Reproduction
https://stackblitz.com/edit/remix-run-remix-koagyf?file=app%2Froutes%2F_index.tsx
In this stackblitz, it will work initially because the Map/Set contains data, but comment out the indicated line of code that adds data to to the map or set and it will fail with an exception in the browser.
If you refresh the stackblitz with empty Map/Set it will initially render correctly, but then the page will clear, with console errors in the browser.
System Info
Used Package Manager
npm
Expected Behavior
To successfully return empty Map and Set from loader and decode via useLoaderData.
Actual Behavior
Unable to return empty Map or Set from a loader, would have to null it out instead.
Exception thrown in browser:
Problem is likely in turbo-stream dependency used by Remix, I raised this issue a few weeks ago, trying to get more visibility here now: jacob-ebey/turbo-stream#26
The text was updated successfully, but these errors were encountered: