Fixing #1510: WeDo2 stop button gives console error if device not connected.

This commit is contained in:
Evelyn Eastmond committed 2018-08-22 11:17:31 -04:00
1 parent d1761466fc
commit 3659973101
1 file changed
+1
+1
View File
@@ -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();