You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The idea here is that we probably only didn't want to allow undefined previously because it's stripped from JSON.stringify. So we added our own error - which we then also added to defer for consistency (no resolving a defer promise with undefined).
With single fetch - turbo-stream can stream undefined without issue and can handle resolving promises with undefined. Folks have also specifically filed bugs that resolving with undefined crashes/hangs because we no longer have a defer place to detect and throw.
So it seems simpler overall to just let them return whatever they want/ resolve with whatever they want, and stream it down untouched.
This should be done in Remix v2 behind the future flag (removing the error from loaders/actions) and then copied into v7
The text was updated successfully, but these errors were encountered:
See #11513
The idea here is that we probably only didn't want to allow
undefined
previously because it's stripped fromJSON.stringify
. So we added our own error - which we then also added todefer
for consistency (no resolving a defer promise with undefined).With single fetch - turbo-stream can stream undefined without issue and can handle resolving promises with undefined. Folks have also specifically filed bugs that resolving with undefined crashes/hangs because we no longer have a
defer
place to detect and throw.So it seems simpler overall to just let them return whatever they want/ resolve with whatever they want, and stream it down untouched.
This should be done in Remix v2 behind the future flag (removing the error from loaders/actions) and then copied into v7
The text was updated successfully, but these errors were encountered: