summaryrefslogtreecommitdiff
path: root/op_crates
diff options
context:
space:
mode:
Diffstat (limited to 'op_crates')
-rw-r--r--op_crates/web/08_text_encoding.js1
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);