Fixed Interpreter.boolarg incorrectly checking strings

This commit is contained in:
MathWizz 2013-11-04 12:35:43 -06:00
parent 68bbfc962a
commit 2bc7a4afc0

View file

@ -217,7 +217,7 @@ Interpreter.prototype.boolarg = function(block, index) {
if (typeof arg === 'boolean') {
return arg;
} else if (typeof arg === 'string') {
return arg === '' || arg === '0' || arg.toLowerCase() === 'false';
return !(arg === '' || arg === '0' || arg.toLowerCase() === 'false');
}
return arg;
}