summaryrefslogtreecommitdiff
path: root/ext/node/polyfills/_brotli.js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/node/polyfills/_brotli.js')
-rw-r--r--ext/node/polyfills/_brotli.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/node/polyfills/_brotli.js b/ext/node/polyfills/_brotli.js
index bf099759b..cd54eedda 100644
--- a/ext/node/polyfills/_brotli.js
+++ b/ext/node/polyfills/_brotli.js
@@ -19,6 +19,10 @@ const toU8 = (input) => {
return enc.encode(input);
}
+ if (input.buffer) {
+ return new Uint8Array(input.buffer);
+ }
+
return input;
};