From 88cf1d3ebe8e414de07d88891e549f6b23a5022e Mon Sep 17 00:00:00 2001 From: Nanda Date: Mon, 9 Dec 2024 10:10:25 +1100 Subject: [PATCH] Revert polyfill change. --- entry.js | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) 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();