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

Issue where index is -1 or more than total #1303

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

Conversation

rohangeorge91
Copy link

When the user does a crazy amount of swapping the component get diff as negative or positive and sometimes result in an overflow 'or' underflow of the index results in the component sort of not responding. This only reset the value to 0 or total if the loop is false

Is it a bugfix ?

  • Yes
  • If yes, which issue - Sorry, no idea our QA reported this (and replicating it is almost impossible) and we figured out it was because the index was going to -1 in our case.

Describe what you've done:

It just a minor check if not loop and index is negative or more than total then it reset them to the limit of 0 or total - 1 seeing that total is set to 1 if not passed or 0, this shouldn't cause a NaN

How to test it?

Like a large number of users swipes left and right randomly (guess onScrollEnd to call with diff and x = 0) again only happens for a non-loop scenario.

When the user does a crazy amount of swapping the component get diff as negative or positive and sometimes result in an overflow 'or' underflow of the index results in the component sort of not responding. This only reset the value to 0 or total if the loop is false
@chenqiongqiong
Copy link

11

@rohangeorge91
Copy link
Author

Sorry, can we merge this or is there something wrong with the PR? Did I miss something?

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.

2 participants