Skip to content

Commit

Permalink
Revert polyfill change.
Browse files Browse the repository at this point in the history
  • Loading branch information
na9da committed Dec 8, 2024
1 parent 33d6883 commit 3b76923
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions entry.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import polyfill from "terriajs/lib/Core/polyfill";
import globeGif from "./lib/Styles/globe.gif";
import "./lib/Styles/loader.css";

Expand Down Expand Up @@ -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();

0 comments on commit 3b76923

Please sign in to comment.