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
Certain React Native JavaScript environments natively support ArrayBuffer but not Blob, causing the polyfill's support matrix to have arraybuffer: true but blob: false.
Unfortunately with this config, the .arrayBuffer() response handler is never hooked up, because that function's definition is gated on an if (support.blob) check.
I'd like to propose decoupling these so that ArrayBuffer responses are optimistically supported by the polyfill as long as the environment supports the proper types without need for a direct Blob dependency.
Repro
In React Native for Windows 0.64, try fetch("https://example.com/").then(resp => resp.arrayBuffer()) - this will fail with "arrayBuffer is not a function".
Testing this same environment with a local patch to decouple the support.arrayBuffer and support.blob checks, the fetch succeeds and can be converted into an ArrayBuffer as needed. I can share the patch is desired!
The text was updated successfully, but these errors were encountered:
Certain React Native JavaScript environments natively support ArrayBuffer but not Blob, causing the polyfill's support matrix to have
arraybuffer: true
butblob: false
.Unfortunately with this config, the
.arrayBuffer()
response handler is never hooked up, because that function's definition is gated on anif (support.blob)
check.I'd like to propose decoupling these so that ArrayBuffer responses are optimistically supported by the polyfill as long as the environment supports the proper types without need for a direct Blob dependency.
Repro
In React Native for Windows 0.64, try
fetch("https://example.com/").then(resp => resp.arrayBuffer())
- this will fail with "arrayBuffer is not a function".Testing this same environment with a local patch to decouple the
support.arrayBuffer
andsupport.blob
checks, the fetch succeeds and can be converted into an ArrayBuffer as needed. I can share the patch is desired!The text was updated successfully, but these errors were encountered: