Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(react-native): fix for "<Intermediate Value>.stream is not a func…
…tion" errors in React Native (#1156)
- Loading branch information
03846e1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey that stream needs to be closed or else it is dangling. Is it feasible to check for the
stream
key on thenew Blob([])
object rather than creating the stream ?I don't have a react native environment to test this out on.
Creating a ReadableStream is a heavy operation and the teardown using
.cancel()
is a promise, so it will take an indeterminate time to close, and should be avoided if we can.