Skip to content

Commit

Permalink
Fix Cannot read properties of undefined (reading 'applyCurrentZoomPan')
Browse files Browse the repository at this point in the history
  • Loading branch information
mishchuk committed Oct 21, 2022
1 parent 6869420 commit 5f0c642
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/js/main-scroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

Expand Down

0 comments on commit 5f0c642

Please sign in to comment.