diff --git a/photologue/static/lightgallery/plugins/admin/lg-admin.js b/photologue/static/lightgallery/plugins/admin/lg-admin.js index 4092ee4..0a5bff5 100644 --- a/photologue/static/lightgallery/plugins/admin/lg-admin.js +++ b/photologue/static/lightgallery/plugins/admin/lg-admin.js @@ -58,7 +58,7 @@ class lgAdmin { // Remove HTML element document.querySelectorAll(`[data-slide-name='${this.photoId}']`)[0].remove() - this.core.goToNextSlide(); + this.core.closeGallery(); this.core.refresh(); }); } @@ -83,7 +83,7 @@ class lgAdmin { const thumbnail = document.querySelectorAll(`[data-slide-name='${this.photoId}']`)[0]; if (!this.isStaff) { thumbnail.remove() - this.core.goToNextSlide(); + this.core.closeGallery(); this.core.refresh(); } else { location.reload();