diff options
author | Benjamin Gruenbaum <inglor@gmail.com> | 2020-11-02 01:57:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-02 10:57:18 +1100 |
commit | 9397cf508e57b8dac7d68b5469c1cca0618c6b10 (patch) | |
tree | a431a4c0d3bd4ea684e75536ee1aebf53c65060c /op_crates/web/08_text_encoding.js | |
parent | d9b8778c4594b688ca47fe9eb5bfb288a93ca2a0 (diff) |
fix(op_crates/web): make TextEncoder work with forced non-strings (#8206)
Fixes: #8201
Diffstat (limited to 'op_crates/web/08_text_encoding.js')
-rw-r--r-- | op_crates/web/08_text_encoding.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/op_crates/web/08_text_encoding.js b/op_crates/web/08_text_encoding.js index d93319758..13e256982 100644 --- a/op_crates/web/08_text_encoding.js +++ b/op_crates/web/08_text_encoding.js @@ -1061,6 +1061,7 @@ class TextEncoder { encoding = "utf-8"; encode(input = "") { + input = String(input); // Deno.core.encode() provides very efficient utf-8 encoding if (this.encoding === "utf-8") { return core.encode(input); |