Skip to content

Commit

Permalink
fix(core): don't call update() on lazy loaded if spv !== auto and no …
Browse files Browse the repository at this point in the history
…autoHeight
  • Loading branch information
nolimits4web committed May 15, 2023
1 parent 6768efe commit 378a3c6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/core/events/onLoad.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ import { processLazyPreloader } from '../../shared/process-lazy-preloader.js';
export default function onLoad(e) {
const swiper = this;
processLazyPreloader(swiper, e.target);
if (swiper.params.cssMode) return;
if (
swiper.params.cssMode ||
(swiper.params.slidesPerView !== 'auto' && !swiper.params.autoHeight)
) {
return;
}
swiper.update();
}

0 comments on commit 378a3c6

Please sign in to comment.