mirror of
https://github.com/denoland/deno.git
synced 2024-11-28 16:20:57 -05:00
fix(ext/crypto): fix copying buffersource (#11714)
This commit is contained in:
parent
4010b84675
commit
2d578ea54a
1 changed files with 2 additions and 2 deletions
|
@ -142,8 +142,8 @@
|
||||||
const idlValue = normalizedAlgorithm[member];
|
const idlValue = normalizedAlgorithm[member];
|
||||||
// 3.
|
// 3.
|
||||||
if (idlType === "BufferSource" && idlValue) {
|
if (idlType === "BufferSource" && idlValue) {
|
||||||
normalizedAlgorithm[member] = new Uint8Array(
|
normalizedAlgorithm[member] = TypedArrayPrototypeSlice(
|
||||||
TypedArrayPrototypeSlice(
|
new Uint8Array(
|
||||||
(ArrayBufferIsView(idlValue) ? idlValue.buffer : idlValue),
|
(ArrayBufferIsView(idlValue) ? idlValue.buffer : idlValue),
|
||||||
idlValue.byteOffset ?? 0,
|
idlValue.byteOffset ?? 0,
|
||||||
idlValue.byteLength,
|
idlValue.byteLength,
|
||||||
|
|
Loading…
Reference in a new issue