diff options
author | Divy Srivastava <dj.srivastava23@gmail.com> | 2021-08-15 15:30:35 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-15 12:00:35 +0200 |
commit | 2d578ea54abe1da94d485d5abd501143ee225b96 (patch) | |
tree | 6efcd80045532b7711b1fa5e5a84e719e50d9ac8 /ext/crypto/00_crypto.js | |
parent | 4010b84675dff0b30beb9a4de8282f87f07cb886 (diff) |
fix(ext/crypto): fix copying buffersource (#11714)
Diffstat (limited to 'ext/crypto/00_crypto.js')
-rw-r--r-- | ext/crypto/00_crypto.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/crypto/00_crypto.js b/ext/crypto/00_crypto.js index c3107c288..69425ae6a 100644 --- a/ext/crypto/00_crypto.js +++ b/ext/crypto/00_crypto.js @@ -142,8 +142,8 @@ const idlValue = normalizedAlgorithm[member]; // 3. if (idlType === "BufferSource" && idlValue) { - normalizedAlgorithm[member] = new Uint8Array( - TypedArrayPrototypeSlice( + normalizedAlgorithm[member] = TypedArrayPrototypeSlice( + new Uint8Array( (ArrayBufferIsView(idlValue) ? idlValue.buffer : idlValue), idlValue.byteOffset ?? 0, idlValue.byteLength, |