changeset a535360914c7 in sao:4.4
details: https://hg.tryton.org/sao?cmd=changeset;node=a535360914c7
description:
        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
        (grafted from 39c1e6cf4925d25a2bf8c91aa795ec4c3d860b57)
diffstat:

 src/common.js |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r d8880b9c4bfe -r a535360914c7 src/common.js
--- a/src/common.js     Fri Oct 11 12:06:14 2019 +0200
+++ b/src/common.js     Fri Oct 11 11:46:37 2019 +0200
@@ -1635,7 +1635,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)) {

Reply via email to