diff --git a/src/shared/process-lazy-preloader.js b/src/shared/process-lazy-preloader.js index fa5a7053b..af354b075 100644 --- a/src/shared/process-lazy-preloader.js +++ b/src/shared/process-lazy-preloader.js @@ -1,4 +1,5 @@ export const processLazyPreloader = (swiper, imageEl) => { + if (!swiper || swiper.destroyed || !swiper.params) return; const slideSelector = () => (swiper.isElement ? `swiper-slide` : `.${swiper.params.slideClass}`); const slideEl = imageEl.closest(slideSelector()); if (slideEl) {