mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-23 14:32:59 -05:00
Prevent setting onCharactericChanged callback to null.
This commit is contained in:
parent
6e290ea937
commit
802f752ded
1 changed files with 3 additions and 1 deletions
|
@ -126,7 +126,9 @@ class BLE extends JSONRPCWebSocket {
|
||||||
if (optStartNotifications) {
|
if (optStartNotifications) {
|
||||||
params.startNotifications = true;
|
params.startNotifications = true;
|
||||||
}
|
}
|
||||||
this._characteristicDidChangeCallback = onCharacteristicChanged;
|
if (onCharacteristicChanged) {
|
||||||
|
this._characteristicDidChangeCallback = onCharacteristicChanged;
|
||||||
|
}
|
||||||
return this.sendRemoteRequest('read', params)
|
return this.sendRemoteRequest('read', params)
|
||||||
.catch(e => {
|
.catch(e => {
|
||||||
this.handleDisconnectError(e);
|
this.handleDisconnectError(e);
|
||||||
|
|
Loading…
Reference in a new issue