Merge recursive results in DomainParser.parse_clause

We should use jQuery.merge instead of Array.concat, as concat creates a new
Array (which was not correctly returned) and jQuery.merge merges the contents
of both arrays in the first array.

issue5883
review26651003
This commit is contained in:
Sergi Almacellas Abellana
2016-09-20 09:49:57 +02:00
parent a97be4a36a
commit c0f49e52c8
+1 -1
View File
@@ -1561,7 +1561,7 @@
var result = [];
tokens.forEach(function(clause) {
if (this.is_generator(clause)) {
result.concat(this.parse_clause(clause));
jQuery.merge(result, this.parse_clause(clause));
} else if ((clause == 'OR') || (clause == 'AND')) {
result.push(clause);
} else if ((clause.length == 1) &&