From d9be8d946144cab99da741d5afa5094441b7e9dd Mon Sep 17 00:00:00 2001 From: foxster-mp4 Date: Fri, 24 Nov 2023 18:04:01 -0800 Subject: [PATCH] Update error handling --- common/modules/main.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/common/modules/main.js b/common/modules/main.js index 63a9066..ef245bd 100644 --- a/common/modules/main.js +++ b/common/modules/main.js @@ -44,7 +44,10 @@ export function main(callback, fallbackURL = "../../") { callback(json); waitForAllImagesToLoad(); }) - .catch(error => console.error("An error occurred.", error)); + .catch(error => { + alert(error); + open(fallbackURL); + }); function waitForAllImagesToLoad() { const allImages = document.querySelectorAll("img");