Skip to content

Commit 88c6a63

Browse files
committed
IE8 does not support Array.prototype.forEach select2#2339
1 parent 25f89bf commit 88c6a63

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

select2.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@ the specific language governing permissions and limitations under the Apache Lic
633633
function cleanupJQueryElements() {
634634
var self = this;
635635

636-
Array.prototype.forEach.call(arguments, function (element) {
636+
$.each(arguments, function (i, element) {
637637
self[element].remove();
638638
self[element] = null;
639639
});
@@ -1111,7 +1111,7 @@ the specific language governing permissions and limitations under the Apache Lic
11111111
if (observer !== undefined) {
11121112
if (this.propertyObserver) { delete this.propertyObserver; this.propertyObserver = null; }
11131113
this.propertyObserver = new observer(function (mutations) {
1114-
mutations.forEach(self._sync);
1114+
$.each(mutations, self._sync);
11151115
});
11161116
this.propertyObserver.observe(el.get(0), { attributes:true, subtree:false });
11171117
}

0 commit comments

Comments
 (0)