Skip to content

Commit

Permalink
Fix bug when comparing empty string in mail rules (Foundry376#2254)
Browse files Browse the repository at this point in the history
  • Loading branch information
Phylu authored and exprez135 committed Feb 20, 2021
1 parent e0d9843 commit 9a81459
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/src/components/scenario-editor-models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,12 @@ export const Comparators = {
name: localized('equals'),
arrayMatchFn: Array.prototype.some,
},
({ actual, desired }) => actual.toLowerCase() === desired.toLowerCase()
({ actual, desired }) => {
if (!actual || !desired) {
return actual === desired;
}
return actual.toLowerCase() === desired.toLowerCase()
}
),

matchesExpression: new Comparator(
Expand Down

0 comments on commit 9a81459

Please sign in to comment.