Fixing #1510: WeDo2 stop button gives console error if device not connected.
This commit is contained in:
1 parent
d1761466fc
commit
3659973101
1 file changed
+1
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user