mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-07-13 22:44:04 -04: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…
Add table
Add a link
Reference in a new issue