STscript: don't parse boolean operands as 0 for strings containing just spaces
This commit is contained in:
parent
44e73fbf27
commit
161fc7f0f0
|
@ -514,7 +514,8 @@ export function parseBooleanOperands(args) {
|
|||
return '';
|
||||
}
|
||||
|
||||
const operandNumber = Number(operand);
|
||||
// parseFloat will return NaN for spaces.
|
||||
const operandNumber = parseFloat(operand);
|
||||
|
||||
if (!isNaN(operandNumber)) {
|
||||
return operandNumber;
|
||||
|
|
Loading…
Reference in New Issue