diff --git a/HISTORY.md b/HISTORY.md index 3fc4b74c..7175d696 100755 --- a/HISTORY.md +++ b/HISTORY.md @@ -6,6 +6,9 @@ * **Notable Fixes:** * **Translation Updates:** +### 2019-07-10 +* threads: fixed a glitch when running a generic WHEN hat block with a literal Boolean input + ## v5.0.3 * **Notable Change:** * CSV-parsing auto-detects the most likely delimiter among comma, semi-colon, pipe and tab diff --git a/snap.html b/snap.html index a1336f45..ec39eab3 100755 --- a/snap.html +++ b/snap.html @@ -7,7 +7,7 @@ - + diff --git a/src/threads.js b/src/threads.js index b6be0761..bc79cb82 100644 --- a/src/threads.js +++ b/src/threads.js @@ -61,7 +61,7 @@ StageMorph, SpriteMorph, StagePrompterMorph, Note, modules, isString, copy, isNil, WatcherMorph, List, ListWatcherMorph, alert, console, TableMorph, Color, TableFrameMorph, ColorSlotMorph, isSnapObject, Map, newCanvas, Symbol*/ -modules.threads = '2019-July-10'; +modules.threads = '2019-July-15'; var ThreadManager; var Process; @@ -460,7 +460,7 @@ ThreadManager.prototype.doWhen = function (block, receiver, stopIt) { // since we're asking for the whole context instead of just the result // of the computation, we need to look at the result-context's first // input to find out whether the condition is met - if (test && test.inputs[0] === true) { + if (test === true || (test && test.inputs && test.inputs[0] === true)) { this.startProcess( block, receiver,