You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the virtual slides feature in combination with a slidesPerView of 'auto' something in the updateSlides call fails. To be precise the following line throws "getComputedStyle: Argument 1 is not an object":
After some debugging I figured out that there is a mismatch between slides and slidesLength. slides is an empty array whereas slidesLength is a number above the expected 0.
Expected Behavior
It is expected that while using the virtual module, the updateSlides method will not throw when there are no slides yet.
Check that this is really a bug
Reproduction link
https://codesandbox.io/p/devbox/swiper-vue-virtual-slides-forked-h3ddkv
Bug description
When using the virtual slides feature in combination with a
slidesPerView
of'auto'
something in theupdateSlides
call fails. To be precise the following line throws "getComputedStyle: Argument 1 is not an object":swiper/src/core/update/updateSlides.mjs
Line 101 in fc308b3
Which indeed is true,
slide
isundefined
here.After some debugging I figured out that there is a mismatch between
slides
andslidesLength
.slides
is an empty array whereasslidesLength
is a number above the expected0
.Expected Behavior
It is expected that while using the virtual module, the
updateSlides
method will not throw when there are no slides yet.Actual Behavior
It crashes when there are no slides yet.
Swiper version
11.0.6
Platform/Target and Browser Versions
Ubuntu 23.04, Firefox 121.0 (64-bit)
Validations
Would you like to open a PR for this bug?
The text was updated successfully, but these errors were encountered: