From: Feross Aboukhadijeh Date: Tue, 27 Oct 2020 21:51:43 +0000 (-1000) Subject: Fixes for PR #253 to increase browser compat X-Git-Url: https://zoso.dev/?a=commitdiff_plain;h=a81c86925fd631f215c139c7c6691a643d90c169;p=buffer.git Fixes for PR #253 to increase browser compat --- diff --git a/index.js b/index.js index f5a66e7..775a514 100644 --- a/index.js +++ b/index.js @@ -266,7 +266,7 @@ function fromArrayLike (array) { function fromArrayView (arrayView) { if (isInstance(arrayView, Uint8Array)) { - var copy = Uint8Array.from(arrayView) + var copy = new Uint8Array(arrayView) return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength) } return fromArrayLike(arrayView)