Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix - Crash issue with numberOfItems #292

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Kedar-27
Copy link

@Kedar-27 Kedar-27 commented Oct 6, 2020

When numberOfItems and index both are zero causes crash

When numberOfItems and index is zero
@benatautolist
Copy link

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.

@Kedar-27
Copy link
Author

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.

@kennic
Copy link

kennic commented Oct 30, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants