1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-24 15:19:26 -05:00

fix(ext/crypto): fix copying buffersource (#11714)

This commit is contained in:
Divy Srivastava 2021-08-15 15:30:35 +05:30 committed by GitHub
parent 4010b84675
commit 2d578ea54a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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,