We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5d952ee commit 563e89fCopy full SHA for 563e89f
src/js/serial.js
@@ -127,9 +127,9 @@ class Serial extends EventTarget {
127
* Send data through the serial connection
128
*/
129
async send(data, callback) {
130
- let result = false;
+ let result;
131
try {
132
- result = await this._protocol?.send(data, callback);
+ result = (await this._protocol?.send(data, callback)) ?? { bytesSent: 0 };
133
} catch (error) {
134
result = { bytesSent: 0 };
135
console.error(`${this.logHead} Error sending data:`, error);
0 commit comments