ACarousel icon indicating copy to clipboard operation
ACarousel copied to clipboard

what should the index be when there are no items?

Open nimrodbens opened this issue 3 years ago • 1 comments

i’m having a crash in this library and i can’t seem to pinpoint it.

i have dynamic data so it can also have zero items.

in this case what seems to be the only working thing is to set the index to -1, but i’m not sure if it’s the right way.

#7	0x0000000100861948 in closure #1 in closure #1 in ACarousel.generateContent(proxy:) ()

this is what i can get.

nimrodbens avatar Sep 02 '22 21:09 nimrodbens

I faced the same issue. I'm fetching some items from an API call so at the time of the initial launch, the item count is 0. So it crashes with the error The index should be less than the count of data message.

Isuru-Nanayakkara avatar Oct 31 '23 06:10 Isuru-Nanayakkara