diff --git a/js/jquery.itop-set-widget.js b/js/jquery.itop-set-widget.js index 145cf3fec..fe7d040c4 100644 --- a/js/jquery.itop-set-widget.js +++ b/js/jquery.itop-set-widget.js @@ -321,7 +321,23 @@ $.widget('itop.set_widget', }, _partialCodeRemove: function (setItemCode) { - this.partialValues = this.partialValues.filter(item => (item !== setItemCode)); + this.partialValues = this.partialValues.filter(this._filterArrayOnItem, setItemCode); + }, + + /** + * Used in _partialCodeRemove, as arrow functions can't be used in MSIE :( + * + * Must provide the value to filter on as the filter thisArg parameter + * see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/filter + * + * @param element + * @param index + * @param array + * @returns {boolean} + * @private + */ + _filterArrayOnItem: function (element, index, array) { + return (item !== this); }, _isCodeInPartialValues: function (setItemCode) {