diff --git a/src/js/main-scroll.js b/src/js/main-scroll.js index 6a447f3c..150d5c96 100644 --- a/src/js/main-scroll.js +++ b/src/js/main-scroll.js @@ -290,7 +290,10 @@ class MainScroll { pswp.currSlide = this.itemHolders[1].slide; pswp.contentLoader.updateLazy(positionDifference); - pswp.currSlide.applyCurrentZoomPan(); + if (pswp.currSlide) { + pswp.currSlide.applyCurrentZoomPan(); + } + pswp.dispatch('change'); }