mirror of
https://github.com/driftywinds/driftywinds.github.io.git
synced 2025-12-19 11:03:32 +00:00
Update error handling
This commit is contained in:
@@ -44,7 +44,10 @@ export function main(callback, fallbackURL = "../../") {
|
|||||||
callback(json);
|
callback(json);
|
||||||
waitForAllImagesToLoad();
|
waitForAllImagesToLoad();
|
||||||
})
|
})
|
||||||
.catch(error => console.error("An error occurred.", error));
|
.catch(error => {
|
||||||
|
alert(error);
|
||||||
|
open(fallbackURL);
|
||||||
|
});
|
||||||
|
|
||||||
function waitForAllImagesToLoad() {
|
function waitForAllImagesToLoad() {
|
||||||
const allImages = document.querySelectorAll("img");
|
const allImages = document.querySelectorAll("img");
|
||||||
|
|||||||
Reference in New Issue
Block a user