Skip to content

Commit

Permalink
fix(core): don't proceed lazy if swiper destroyed
Browse files Browse the repository at this point in the history
fixes #6322
  • Loading branch information
nolimits4web committed Feb 6, 2023
1 parent 9fe9a96 commit 4ea0102
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/shared/process-lazy-preloader.js
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down

0 comments on commit 4ea0102

Please sign in to comment.