ArrayBuffer not being supported correctly #2316
Labels
No Label
DBF
Dates
Defined Names
Features
Formula
HTML
Images
Infrastructure
Integration
International
ODS
Operations
Performance
PivotTables
Pro
Protection
Read Bug
SSF
SYLK
Style
Write Bug
good first issue
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sheetjs/sheetjs#2316
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I believe there is a bug here:
333deae63f/bits/87_read.js (L69)
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 below333deae63f/bits/87_read.js (L75)
settingopts.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):
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?