diff --git a/src/lib/polyfill.js b/src/lib/polyfill.js index 87585966a..e3f37f04e 100644 --- a/src/lib/polyfill.js +++ b/src/lib/polyfill.js @@ -392,4 +392,10 @@ if (!String.prototype.startsWith) { return this.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search; }; } + +// NodeList.prototype.forEach polyfill for IE11 +// https://developer.mozilla.org/en-US/docs/Web/API/NodeList/forEach +if (window.NodeList && !NodeList.prototype.forEach) { + NodeList.prototype.forEach = Array.prototype.forEach; +} /* eslint-enable */