diff --git a/history.txt b/history.txt index 7a02a867..d00869d8 100755 --- a/history.txt +++ b/history.txt @@ -2017,3 +2017,4 @@ ______ * Threads: Text comparisons are now case-sensitive („fixes“ #175) * Threads: fixed #179 - don’t identify primitive (static) C-Slots as implicit formal parameters * Threads: fixed #249 - preserve variable value types with edge cases (empty string, Boolean false) +* Threads: fixed #133 - preserve edge-cased argument types (empty string, Boolean false) diff --git a/threads.js b/threads.js index 3ff7a50b..78831cf7 100644 --- a/threads.js +++ b/threads.js @@ -789,7 +789,7 @@ Process.prototype.evaluate = function ( // assign formal parameters for (i = 0; i < context.inputs.length; i += 1) { value = 0; - if (parms[i]) { + if (!isNil(parms[i])) { value = parms[i]; } outer.variables.addVar(context.inputs[i], value); @@ -858,7 +858,7 @@ Process.prototype.fork = function (context, args) { // assign formal parameters for (i = 0; i < context.inputs.length; i += 1) { value = 0; - if (parms[i]) { + if (!isNil(parms[i])) { value = parms[i]; } outer.variables.addVar(context.inputs[i], value); @@ -1018,7 +1018,7 @@ Process.prototype.evaluateCustomBlock = function () { // assign formal parameters for (i = 0; i < context.inputs.length; i += 1) { value = 0; - if (parms[i]) { + if (!isNil(parms[i])) { value = parms[i]; } outer.variables.addVar(context.inputs[i], value);