STscript: don't parse boolean operands as 0 for strings containing just spaces

This commit is contained in:
Cohee 2024-10-11 21:01:32 +03:00
parent 44e73fbf27
commit 161fc7f0f0
1 changed files with 2 additions and 1 deletions

View File

@ -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;