~exprez135/mailspring-libre

9a8145930a3fd64c0559fef7e345c0b0ced2584b — Janosch Maier 3 years ago e0d9843
Fix bug when comparing empty string in mail rules (#2254)

1 files changed, 6 insertions(+), 1 deletions(-)

M app/src/components/scenario-editor-models.ts
M app/src/components/scenario-editor-models.ts => app/src/components/scenario-editor-models.ts +6 -1
@@ 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(