-
Notifications
You must be signed in to change notification settings - Fork 26
Closed
Description
Prior to v4.0.9 if plain Arrays were passed into uint8arrays's own concat it would convert those Arrays into a Uint8Array using the asUint8Array helper.
In v4.0.9 a change was introduced such that:
return asUint8Array(globalThis.Buffer.concat(arrays, length))The problem is that globalThis.Buffer.concat(arrays, length) is passing plain arrays into Buffer.concat before asUint8Array ever has a chance to convert them, which throws an unhandled exception:
Error: [TypeError: "list" argument must be an Array of Buffers]
The fix would either be to revert the change in v4.0.9 or to convert each non-buffer into a Uint8Array first prior to calling globalThis.Buffer.concat(arrays, length). I assume any performance gains will need to be re-evaluated.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels