fix: polyfill missing forEach for NodeLists in IE11

This commit is contained in:
Chi Vinh Le
2018-11-15 23:51:14 +01:00
parent cbd795dc95
commit 4fd61b3731
+5
View File
@@ -14,6 +14,11 @@ import { hideShortcutsNote } from './actions/moderation';
smoothscroll.polyfill();
if (!NodeList.prototype.forEach) {
// Polyfill IE11 missing forEach in NodeList.
NodeList.prototype.forEach = Array.prototype.forEach;
}
function init({ store, localStorage }) {
const shouldHide = localStorage.getItem('coral:shortcutsNote') === 'hide';
if (shouldHide) {