Throw an error toast if the comic has no images (should only happen when something in the file is broken)

This commit is contained in:
Junior 2026-02-16 15:04:24 -05:00
parent 6460cfca37
commit 200de72a85

View File

@ -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,