fix(gallery): check also that PhotoSwipeUI_Default is loaded

This commit is contained in:
Jimmy Cai 2020-12-22 19:16:09 +01:00
parent 9acba47e08
commit 619998b2f3
No known key found for this signature in database
GPG Key ID: 3EA408E527F37B18

View File

@ -21,7 +21,7 @@ class StackGallery {
private items: PhotoSwipeItem[] = [];
constructor(container: HTMLElement, galleryUID = 1) {
if (window.PhotoSwipe == undefined) {
if (window.PhotoSwipe == undefined || window.PhotoSwipeUI_Default == undefined) {
console.error("PhotoSwipe lib not loaded.");
return;
}