mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-23 14:32:59 -05:00
Fixing clearInterval > clearTimeout.
This commit is contained in:
parent
7a1367d81a
commit
59ab3b717d
1 changed files with 2 additions and 2 deletions
|
@ -239,7 +239,7 @@ class MicroBit {
|
|||
* Disconnect from the micro:bit.
|
||||
*/
|
||||
disconnect () {
|
||||
window.clearInterval(this._timeoutID);
|
||||
window.clearTimeout(this._timeoutID);
|
||||
if (this._ble) {
|
||||
this._ble.disconnect();
|
||||
}
|
||||
|
@ -329,7 +329,7 @@ class MicroBit {
|
|||
this._sensors.gestureState = data[9];
|
||||
|
||||
// cancel disconnect timeout and start a new one
|
||||
window.clearInterval(this._timeoutID);
|
||||
window.clearTimeout(this._timeoutID);
|
||||
this._timeoutID = window.setTimeout(
|
||||
() => this._ble.handleDisconnectError(BLEDataStoppedError),
|
||||
BLETimeout
|
||||
|
|
Loading…
Reference in a new issue