diff options
Diffstat (limited to 'ext/web/14_compression.js')
-rw-r--r-- | ext/web/14_compression.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ext/web/14_compression.js b/ext/web/14_compression.js index a3bca50e5..f6f22bed3 100644 --- a/ext/web/14_compression.js +++ b/ext/web/14_compression.js @@ -7,6 +7,10 @@ const core = globalThis.Deno.core; const ops = core.ops; +const primordials = globalThis.__bootstrap.primordials; +const { + TypedArrayPrototypeGetByteLength, +} = primordials; import * as webidl from "ext:deno_webidl/00_webidl.js"; import { TransformStream } from "ext:deno_web/06_streams.js"; @@ -113,7 +117,7 @@ class DecompressionStream { } function maybeEnqueue(controller, output) { - if (output && output.byteLength > 0) { + if (output && TypedArrayPrototypeGetByteLength(output) > 0) { controller.enqueue(output); } } |