summaryrefslogtreecommitdiff
path: root/examples/device
diff options
context:
space:
mode:
authorraldone01 <[email protected]>2025-07-05 19:42:44 +0200
committerraldone01 <[email protected]>2025-07-05 19:42:44 +0200
commiteeb73550ef1cf917159c05ddff574dcfcd10514c (patch)
tree19d72d8392ef8ca344c915babf4c7accb8f401c2 /examples/device
parente11047f00367e3b32cbc966de0ad687276aa613b (diff)
Remove double text encoder in `SerialPort`.
Diffstat (limited to 'examples/device')
-rw-r--r--examples/device/webusb_serial/website/serial.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/examples/device/webusb_serial/website/serial.js b/examples/device/webusb_serial/website/serial.js
index 304792e05..18bb8a717 100644
--- a/examples/device/webusb_serial/website/serial.js
+++ b/examples/device/webusb_serial/website/serial.js
@@ -83,8 +83,7 @@ class SerialPort {
/// Send data to port
send(data) {
if (!this.writer) throw new Error('Port not connected');
- const encoder = new TextEncoder();
- return this.writer.write(encoder.encode(data));
+ return this.writer.write(data);
}
async forgetDevice() {}