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:
parent
6460cfca37
commit
200de72a85
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user