diff --git a/src/core/core.js b/src/core/core.js index aba9d770e..6b7fb6316 100644 --- a/src/core/core.js +++ b/src/core/core.js @@ -140,6 +140,7 @@ class Swiper { slidesGrid: [], snapGrid: [], slidesSizesGrid: [], + activeSlides: [], // isDirection isHorizontal() { diff --git a/src/core/update/updateAutoHeight.js b/src/core/update/updateAutoHeight.js index 6c10d2372..f4210b546 100644 --- a/src/core/update/updateAutoHeight.js +++ b/src/core/update/updateAutoHeight.js @@ -33,6 +33,10 @@ export default function updateAutoHeight(speed) { activeSlides.push(getSlideByIndex(swiper.activeIndex)); } + Object.assign(swiper, { + activeSlides, + }); + // Find new height from highest slide in view for (i = 0; i < activeSlides.length; i += 1) { if (typeof activeSlides[i] !== 'undefined') {