Skip to content

Commit

Permalink
fix invalid archive in Deno (fix #466)
Browse files Browse the repository at this point in the history
  • Loading branch information
gildas-lormeau committed Dec 4, 2023
1 parent e0a277f commit 54b3e40
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/core/codec-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,12 @@ function sendMessage(message, { worker, writer, onTaskFinished, transferStreams
let { value, readable, writable } = message;
const transferables = [];
if (value) {
message.value = value.buffer;
if (value.byteLength < value.buffer.byteLength) {
message.value = value.buffer.slice(0, value.byteLength);
}
else {
message.value = value.buffer;
}
transferables.push(message.value);
}
if (transferStreams && transferStreamsSupported) {
Expand Down

0 comments on commit 54b3e40

Please sign in to comment.