diff --git a/entry.js b/entry.js index 1345d8b1f..a81570398 100644 --- a/entry.js +++ b/entry.js @@ -1,3 +1,4 @@ +import polyfill from "terriajs/lib/Core/polyfill"; import globeGif from "./lib/Styles/globe.gif"; import "./lib/Styles/loader.css"; @@ -42,16 +43,18 @@ function createLoader() { loaderDiv.style.backgroundColor = "#383F4D"; document.body.appendChild(loaderDiv); - loadMainScript() - .catch(() => { - // Ignore errors and try to show the map anyway - }) - .then(() => { - loaderDiv.classList.add("loader-ui-hide"); - setTimeout(() => { - document.body.removeChild(loaderDiv); - }, 2000); - }); + polyfill(() => + loadMainScript() + .catch(() => { + // Ignore errors and try to show the map anyway + }) + .then(() => { + loaderDiv.classList.add("loader-ui-hide"); + setTimeout(() => { + document.body.removeChild(loaderDiv); + }, 2000); + }) + ); } createLoader();