diff --git a/package.json b/package.json index 6ab89c9f3..d7540477b 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "scratch-render": "latest", "script-loader": "0.7.0", "stats.js": "0.17.0", - "tap": "10.0.2", + "tap": "10.1.0", "travis-after-all": "1.4.4", "webpack": "2.2.1", "webpack-dev-server": "1.16.3" diff --git a/src/engine/runtime.js b/src/engine/runtime.js index f196a6a69..fc3b17a06 100644 --- a/src/engine/runtime.js +++ b/src/engine/runtime.js @@ -439,6 +439,11 @@ Runtime.prototype.startHats = function (requestedHatOpcode, } var instance = this; var newThreads = []; + + for (var opts in optMatchFields) { + optMatchFields[opts] = optMatchFields[opts].toUpperCase(); + } + // Consider all scripts, looking for hats with opcode `requestedHatOpcode`. this.allScriptsDo(function (topBlockId, target) { var potentialHatOpcode = target.blocks.getBlock(topBlockId).opcode; @@ -466,7 +471,7 @@ Runtime.prototype.startHats = function (requestedHatOpcode, if (optMatchFields) { for (var matchField in optMatchFields) { - if (hatFields[matchField].value !== + if (hatFields[matchField].value.toUpperCase() !== optMatchFields[matchField]) { // Field mismatch. return;