summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/web/08_text_encoding.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/web/08_text_encoding.js b/ext/web/08_text_encoding.js
index d2922a6d4..692909726 100644
--- a/ext/web/08_text_encoding.js
+++ b/ext/web/08_text_encoding.js
@@ -292,6 +292,9 @@
transform: (chunk, controller) => {
try {
chunk = webidl.converters.DOMString(chunk);
+ if (chunk === "") {
+ return PromiseResolve();
+ }
if (this.#pendingHighSurrogate !== null) {
chunk = this.#pendingHighSurrogate + chunk;
}