Skip to content

Commit eeb7355

Browse files
committed
Remove double text encoder in SerialPort.
1 parent e11047f commit eeb7355

File tree

1 file changed

+1
-2
lines changed
  • examples/device/webusb_serial/website

1 file changed

+1
-2
lines changed

examples/device/webusb_serial/website/serial.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,7 @@ class SerialPort {
8383
/// Send data to port
8484
send(data) {
8585
if (!this.writer) throw new Error('Port not connected');
86-
const encoder = new TextEncoder();
87-
return this.writer.write(encoder.encode(data));
86+
return this.writer.write(data);
8887
}
8988

9089
async forgetDevice() {}

0 commit comments

Comments
 (0)