Skip to content

Commit e48bf09

Browse files
committed
correction to error handling on serial_node_ble
1 parent 38537d7 commit e48bf09

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

core/serial_node_ble.js

+5-4
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,12 @@
122122
}
123123

124124
getAdapter().then((adapter) =>
125-
scanDevices(adapter)).catch(() =>
126-
callback([], true)
127-
).then((devices) =>
125+
scanDevices(adapter)).then((devices) =>
128126
callback(devices, false)
129-
);
127+
).catch((err) => {
128+
console.error("serial_node_ble", "error on scanDevices", err)
129+
callback([], true)
130+
})
130131
};
131132

132133
var closeSerial = function () {

0 commit comments

Comments
 (0)