mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
STscript: don't parse boolean operands as 0 for strings containing just spaces
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user