mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-23 14:32:59 -05:00
Fixing #1510: WeDo2 stop button gives console error if device not connected.
This commit is contained in:
parent
d1761466fc
commit
3659973101
1 changed files with 1 additions and 0 deletions
|
@ -657,6 +657,7 @@ class WeDo2 {
|
|||
* Stop the tone playing and motors on the WeDo 2.0 hub.
|
||||
*/
|
||||
_stopAll () {
|
||||
if (!this.getPeripheralIsConnected()) return;
|
||||
this.stopTone();
|
||||
this.stopAllMotors();
|
||||
// this.stopLED();
|
||||
|
|
Loading…
Reference in a new issue