Prevent setting onCharactericChanged callback to null.

This commit is contained in:
Evelyn Eastmond 2019-01-16 19:50:32 -05:00
parent 6e290ea937
commit 802f752ded

View file

@ -126,7 +126,9 @@ class BLE extends JSONRPCWebSocket {
if (optStartNotifications) {
params.startNotifications = true;
}
if (onCharacteristicChanged) {
this._characteristicDidChangeCallback = onCharacteristicChanged;
}
return this.sendRemoteRequest('read', params)
.catch(e => {
this.handleDisconnectError(e);