fix(promotion): don't evaluate rule condition if conditions to evaluate is empty (#10795)

This commit is contained in:
Riqwan Thamir authored and GitHub committed 2025-01-06 09:31:58 +01:00
1 parent 95b61bf2da
commit f7ffa3540f
3 files changed
+43

No files matched your search

@@ -115,6 +115,10 @@ export function evaluateRuleValueCondition(
ruleValuesToCheck = [ruleValuesToCheck]
}
if (!ruleValuesToCheck.length) {
return false
}
return ruleValuesToCheck.every((ruleValueToCheck: string) => {
if (operator === "in" || operator === "eq") {
return ruleValues.some((ruleValue) => ruleValue === ruleValueToCheck)