Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use ArrayBuffer.isView rather than instanceof to distinguish between …
…views and array buffers. Using instanceof to determine ArrayBuffers is fraught with problems in Javascript. See, for example, lodash’s implementation of isArrayBuffer, or the many isArrayBuffer libraries out there. Apparently, ArrayBuffers from a different context (like an iframe, or perhaps something in a test setup) so instanceof won’t work always. See feross/buffer#166 for some more examples.
- Loading branch information