From 7103a8a0e7456008df35edeb4996e583ddb0641a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 11 Oct 2019 11:46:37 +0200 Subject: [PATCH] Use strict equality to compare clause against operator In javascript, a list containing a string is equals to the string, e.g: ['foo'] == 'foo' issue8711 review268071002 --- src/common.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common.js b/src/common.js index 4dccc98dff..7a241a869d 100644 --- a/src/common.js +++ b/src/common.js @@ -1688,7 +1688,7 @@ tokens.forEach(function(clause) { if (this.is_generator(clause)) { result.push(this.parse_clause(clause)); - } else if ((clause == 'OR') || (clause == 'AND')) { + } else if ((clause === 'OR') || (clause === 'AND')) { result.push(clause); } else if ((clause.length == 1) && !(clause[0] instanceof Array)) {