From 7d7ce2db13403bbd7c09fe4f4de1a7dfa90d62a1 Mon Sep 17 00:00:00 2001 From: Kevin Andersen Date: Tue, 30 Jul 2019 10:20:34 -0400 Subject: [PATCH] Fixed issue where port A motor position was not being reported because the port number was false-y --- src/extensions/scratch3_boost/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/extensions/scratch3_boost/index.js b/src/extensions/scratch3_boost/index.js index cf460d5a..594009a2 100644 --- a/src/extensions/scratch3_boost/index.js +++ b/src/extensions/scratch3_boost/index.js @@ -1935,7 +1935,7 @@ class Scratch3BoostBlocks { log.warn('Asked for a motor position that doesnt exist!'); return false; } - if (portID && this._peripheral.motor(portID)) { + if (portID !== null && this._peripheral.motor(portID)) { let val = this._peripheral.motor(portID).position; // Boost motor A position direction is reversed by design // so we have to reverse the position here