From 200de72a855287314c635aced7049c015b7aaa1e Mon Sep 17 00:00:00 2001 From: Junior Date: Mon, 16 Feb 2026 15:04:24 -0500 Subject: [PATCH] Throw an error toast if the comic has no images (should only happen when something in the file is broken) --- js/comics.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/js/comics.js b/js/comics.js index 9b40f26..4579931 100644 --- a/js/comics.js +++ b/js/comics.js @@ -228,6 +228,12 @@ function showComic(comic, name) { redirectToLogin(); return; } + if ( data.images.length == 0 ) { + toastr.remove(); + toastr.error("There doesn't seem to be any images in this comic. Please contact the admin!", "Comics is empty", {timeOut: 8000}); + return; + } + toastr.remove(); lightbox = SimpleLightbox.open({ items: data.images, captions: data.captions,