From 23286d186bc40355b4cebb74935ca8f5fbd7bc73 Mon Sep 17 00:00:00 2001 From: Wolfsblvt Date: Wed, 25 Sep 2024 20:44:28 +0200 Subject: [PATCH] Fix lint issues --- public/scripts/variables.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/public/scripts/variables.js b/public/scripts/variables.js index 9edc0940b..443bbbd30 100644 --- a/public/scripts/variables.js +++ b/public/scripts/variables.js @@ -523,11 +523,12 @@ export function evalBoolean(rule, a, b) { if (b === undefined) { switch (rule) { case undefined: - case 'not': + case 'not': { const resultOnTruthy = rule !== 'not'; if (isTrueBoolean(String(a))) return resultOnTruthy; if (isFalseBoolean(String(a))) return !resultOnTruthy; - return !!a ? resultOnTruthy : !resultOnTruthy; + return a ? resultOnTruthy : !resultOnTruthy; + } default: throw new Error(`Unknown boolean comparison rule for truthy check. If right operand is not provided, the rule must not provided or be 'not'. Provided: ${rule}`); }