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

Undefined index while rendering sticky #674

Merged
merged 4 commits into from
Jan 27, 2022
Merged

Undefined index while rendering sticky #674

merged 4 commits into from
Jan 27, 2022

Conversation

naqvitalha
Copy link
Collaborator

currentStickyIndex had undefined checks in the code even though it's type doesn't include it. I'm seeing cases in Shopify code where this value is undefined and yet a render is being attempted.

This generally happens if you have a large value a currentIndex and amount of data is then reduced. Regardless, the computations gets updated soon after. It can cause a crash sometimes which this check will mitigate.

@naqvitalha naqvitalha merged commit 269ac85 into master Jan 27, 2022
@naqvitalha naqvitalha deleted the undefinedIndex branch January 27, 2022 05:59
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