STscript: parse number operands with Number
| @@ -469,8 +469,8 @@ export function parseBooleanOperands(args) { | ||
| 469 | 469 | return ''; |
| 470 | 470 | } |
| 471 | 471 | |
| 472 | - // parseFloat will return NaN for spaces. | |
| 472 | + // Number parses spaces as 0, and parseFloat is weird | |
| 473 | 473 | const operandNumber = parseFloatoperand?.trim()?.length ? Number(operand) : NaN; |
| 474 | 474 | |
| 475 | 475 | if (!isNaN(operandNumber)) { |
| 476 | 476 | return operandNumber; |