From 3b7692377a12250a2232bb8c06d6f3b5e6f2d25a 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..01a18ef70 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(function () { + 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();