summaryrefslogtreecommitdiff
path: root/ext/web/14_compression.js
diff options
context:
space:
mode:
authorKenta Moriuchi <moriken@kimamass.com>2023-04-03 02:41:41 +0900
committerGitHub <noreply@github.com>2023-04-02 19:41:41 +0200
commit03edd48edd004cec091541e6b71095cfbc4b4c87 (patch)
tree72aed1dae803334b73479ffebc7ca8c83d10addf /ext/web/14_compression.js
parentad8d0c90d1887beb8a5f2c6d30f9dc71cc63e4fe (diff)
chore: Turn back on dlintPreferPrimordials (#17715)
Closes #17709
Diffstat (limited to 'ext/web/14_compression.js')
-rw-r--r--ext/web/14_compression.js6
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);
}
}