From 360aa8461d0d90e9b9550aa6b567291e200c95da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20=C3=89vrard?= Date: Fri, 15 May 2015 13:50:52 +0200 Subject: [PATCH] Remove the need to define domain operators issue4714 review7111002 --- src/common.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/common.js b/src/common.js index df080311c1..800a997c30 100644 --- a/src/common.js +++ b/src/common.js @@ -1931,7 +1931,7 @@ is_leaf: function(expression) { return ((expression instanceof Array) && (expression.length > 2) && - (expression[1] in this.OPERATORS)); + (expression[1] instanceof String)); }, eval_leaf: function(part, context, boolop) { if (boolop === undefined) { @@ -1982,7 +1982,11 @@ '!=': 'not in' }[operand]; } - return this.OPERATORS[operand](context_field, value); + if (operand in this.OPERATORS) { + return this.OPERATORS[operand](context_field, value); + } else { + return true; + } }, inverse_leaf: function(domain) { if (~['AND', 'OR'].indexOf(domain)) {