FSPagerView icon indicating copy to clipboard operation
FSPagerView copied to clipboard

Fix - Crash issue with numberOfItems

Open Kedar-27 opened this issue 3 years ago • 3 comments

When numberOfItems and index both are zero causes crash

Kedar-27 avatar Oct 06 '20 20:10 Kedar-27

The original code seems correct to me, if you try to scroll to the 0th (first) element when there are no items in the array, then it should crash.

benatautolist avatar Oct 27 '20 22:10 benatautolist

The original code seems correct to me, if you try to scroll to the 0th (first) element when there are no items in the array, then it should crash.

I agree, but when it is on automatic scroll and you remove items from the array, then it shouldn't crash.

Kedar-27 avatar Oct 28 '20 15:10 Kedar-27

The original code seems correct to me, if you try to scroll to the 0th (first) element when there are no items in the array, then it should crash.

it should scroll to maximum index (or do nothing if empty item) instead, making it crash is a very bad idea.

kennic avatar Oct 30 '20 05:10 kennic