From c0ea5be1d311bff65e653a47b23b648e70e47ab4 Mon Sep 17 00:00:00 2001 From: Eric Rosenbaum Date: Tue, 9 Apr 2019 17:36:14 -0400 Subject: [PATCH] Fix whenColor hat --- src/extensions/scratch3_boost/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/extensions/scratch3_boost/index.js b/src/extensions/scratch3_boost/index.js index e8b6859a7..f1657f8f4 100644 --- a/src/extensions/scratch3_boost/index.js +++ b/src/extensions/scratch3_boost/index.js @@ -1925,7 +1925,7 @@ class Scratch3BoostBlocks { * @return {boolean} - true if the tilt sensor is tilted past a threshold in the specified direction. */ whenColor (args) { - return this._isColor(args.COLOR); + return this._isColor(args); } /** @@ -1944,7 +1944,7 @@ class Scratch3BoostBlocks { * @private */ _isColor (args) { - switch (args) { + switch (args.COLOR) { case BoostColorLabel.ANY: if (Object.keys(BoostColor).find(key => BoostColor[key]) .toLowerCase() !== this.getColor()) { @@ -1956,7 +1956,7 @@ class Scratch3BoostBlocks { } break; default: - return this.getColor() === color; + return this.getColor() === args.COLOR; } }