ArrayBuffer not being supported correctly #2316
Labels
Comments
ES6 issues aside (can't use spread), that looks reasonable and we'd accept a PR. |
@SheetJSDev Hey can i work on this issue , if available? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I believe there is a bug here:
sheetjs/bits/87_read.js
Line 69 in 333deae
If the input data was an
ArrayBuffer
but opts would not have atype
set we would essentially convert theArrayBuffer
toUint8Array
and callreadSync
again but without setting appropriateopts.type
. This then leads to few lines belowsheetjs/bits/87_read.js
Line 75 in 333deae
opts.type
tobase64
which results in errors later on.This can be replicated by using the library in a browser app, reading a file, using
File.arrayBuffer
(https://developer.mozilla.org/en-US/docs/Web/API/File) and passing this buffer as a source of data:Easy fix (on line 69):
The text was updated successfully, but these errors were encountered: