diff --git a/assets/ts/gallery.ts b/assets/ts/gallery.ts index 208194f..2e1063b 100644 --- a/assets/ts/gallery.ts +++ b/assets/ts/gallery.ts @@ -21,11 +21,11 @@ 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; } - + this.galleryUID = galleryUID; StackGallery.createGallery(container);