Throw when left operand not provided
| @@ -544,6 +544,10 @@ export function parseBooleanOperands(args) { | ||
| 544 | 544 | * @returns {boolean} True if the rule yields true, false otherwise |
| 545 | 545 | */ |
| 546 | 546 | export function evalBoolean(rule, a, b) { |
| 547 | + if (a === undefined) { | |
| 548 | + throw new Error('Left operand is not provided'); | |
| 549 | + } | |
| 550 | + | |
| 547 | 551 | // If right-hand side was not provided, whe just check if the left side is truthy |
| 548 | 552 | if (b === undefined) { |
| 549 | 553 | switch (rule) { |