diff --git a/src/module-elasticsuite-catalog/view/frontend/web/js/attribute-filter.js b/src/module-elasticsuite-catalog/view/frontend/web/js/attribute-filter.js index b0d32324d..fe676c78d 100644 --- a/src/module-elasticsuite-catalog/view/frontend/web/js/attribute-filter.js +++ b/src/module-elasticsuite-catalog/view/frontend/web/js/attribute-filter.js @@ -122,13 +122,13 @@ define([ var isValidItem = true; var itemTokens = this.slugify(item.label).split('-'); searchTokens.forEach(function(currentToken) { - if (!itemTokens.includes(currentToken)) { + if (itemTokens.indexOf(currentToken) === -1) { isValidItem = false; } }) if (isValidItem && lastSearchToken) { var ngrams = itemTokens.map(function(token) {return token.substring(0, lastSearchToken.length)}); - isValidItem = ngrams.includes(lastSearchToken); + isValidItem = ngrams.indexOf(lastSearchToken) !== -1; } return isValidItem; }.bind(this))