locked
JavaScript critical error in http://localhost:2825/js/comboTreePlugin.js\n\nSCRIPT1002: Syntax error RRS feed

  • Question

  • User-1355965324 posted

    Please can you help me how to fix  the error while running IE . The error message is being showed 

    'JavaScript critical error at line 450, column 40 in http://localhost:2825/js/comboTreePlugin.js\n\nSCRIPT1002: Syntax error'. The error is coming in the code given below starting with .filter((index, item) =>. 

    Please can you help me  how to fix it

     ComboTree.prototype.filterDropDownMenu = function () {
            var searchText =  '';
            if (!this.options.isMultiple)
                searchText = this._elemInput.val();
            else
                searchText = $("#" + this.comboTreeId + "MultiFilter").val();
    
            if (searchText != ""){
                this._elemItemsTitle.hide();
                this._elemItemsTitle.siblings("span.comboTreeParentPlus").hide();
                list = this._elemItems
                    .filter((index, item) => {
                        return item.innerHTML.toLowerCase().indexOf(searchText.toLowerCase()) != -1;
                    })
                    .each(function (i, elem) {
                        $(this.children).show()
                        $(this).siblings("span.comboTreeParentPlus").show();
                    });
            }
            else{
                this._elemItemsTitle.show();
                this._elemItemsTitle.siblings("span.comboTreeParentPlus").show();
            }
        }

    Friday, August 21, 2020 2:45 PM

Answers