Skip to content

Commit

Permalink
fix(core): fix error for swiperSlideSize in hidden slider
Browse files Browse the repository at this point in the history
fixes #6718
  • Loading branch information
nolimits4web committed Jun 7, 2023
1 parent d61da52 commit 36ef2e6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,9 @@ class Swiper {
const swiper = this;
const { params, slides, slidesGrid, slidesSizesGrid, size: swiperSize, activeIndex } = swiper;
let spv = 1;

if (params.centeredSlides) {
let slideSize = slides[activeIndex].swiperSlideSize;
let slideSize = slides[activeIndex] ? slides[activeIndex].swiperSlideSize : 0;
let breakLoop;
for (let i = activeIndex + 1; i < slides.length; i += 1) {
if (slides[i] && !breakLoop) {
Expand Down

0 comments on commit 36ef2e6

Please sign in to comment.