Carousel cannot render when value.length === 0 && numVisible !== numScroll #1201
Labels
Type: Bug
Issue contains a bug related to a specific component. Something about the component is not working
Milestone
When a Carousel gets an empty array as
value
prop andnumVisible / numScroll !== 1
, then the computed propertytotalIndicators
becomes negative.As a result, a RangeError is throwed due to this line.
In my case, an empty array is passed to the Carousel component, while it is in the process of being rendered, because of the array's async loading.
I think that the best solution is to add a
v-if="totalIndicators >= 0"
to this line.I will create a PR.
The text was updated successfully, but these errors were encountered: