JSDoc types can be deceiving
| @@ -470,7 +470,7 @@ export function parseBooleanOperands(args) { | |||
| 470 | } | 470 | } |
| 471 | 471 | ||
| 472 | // Number parses spaces as 0, and parseFloat is weird | 472 | // Number parses spaces as 0, and parseFloat is weird |
| 473 | const operandNumber = operand?.trim()?.length ? Number(operand) : NaN; | 473 | const operandNumber = typeof operand === 'string' && operand.trim().length ? Number(operand) : NaN; |
| 474 | 474 | ||
| 475 | if (!isNaN(operandNumber)) { | 475 | if (!isNaN(operandNumber)) { |
| 476 | return operandNumber; | 476 | return operandNumber; |