summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Casonato <hello@lcas.dev>2022-06-17 12:49:57 +0200
committerGitHub <noreply@github.com>2022-06-17 12:49:57 +0200
commit870d2007163f687b1014db4e5cb43f95aff6d77f (patch)
treefec6cf9f977df24e5f47d70402b98f72ca19d45f
parentfa6274cffe43a35fa14a0de75a4614e19d2d3013 (diff)
fix(ext/web): handle rid=0 in TextDecoder#decode (#14894)
-rw-r--r--ext/web/08_text_encoding.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/web/08_text_encoding.js b/ext/web/08_text_encoding.js
index 86ac5ab3c..282618da3 100644
--- a/ext/web/08_text_encoding.js
+++ b/ext/web/08_text_encoding.js
@@ -143,7 +143,7 @@
stream: options.stream,
});
} finally {
- if (!options.stream && this.#rid) {
+ if (!options.stream && this.#rid !== null) {
core.close(this.#rid);
this.#rid = null;
}