Skip to content

Commit 563e89f

Browse files
committed
CR nitpick
1 parent 5d952ee commit 563e89f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/js/serial.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,9 @@ class Serial extends EventTarget {
127127
* Send data through the serial connection
128128
*/
129129
async send(data, callback) {
130-
let result = false;
130+
let result;
131131
try {
132-
result = await this._protocol?.send(data, callback);
132+
result = (await this._protocol?.send(data, callback)) ?? { bytesSent: 0 };
133133
} catch (error) {
134134
result = { bytesSent: 0 };
135135
console.error(`${this.logHead} Error sending data:`, error);

0 commit comments

Comments
 (0)