mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2025-04-29 03:53:30 +08:00
fix(gallery): check also that PhotoSwipeUI_Default is loaded
This commit is contained in:
parent
9acba47e08
commit
619998b2f3
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user