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(virtual-scroll): don't crash with empty cells list #17799

Merged
merged 9 commits into from Jun 11, 2019

Conversation

Projects
None yet
3 participants
@wwoods
Copy link
Contributor

commented Mar 15, 2019

Short description of what this resolves:

In some conditions combining e.g. ion-infinite-scroll with ion-virtual-scroll, the cells list can be empty, meaning accessing this.cells[this.cells.length - 1] throws an error.

Changes proposed in this pull request:

Correct the line to return zero when the cell list is empty rather than throwing an error.

Ionic Version: latest.

Fixes: #

@liamdebeasi

This comment has been minimized.

Copy link
Member

commented Mar 22, 2019

Hi there,

Does this PR fix a particular issue logged in our issue tracker? If so, could you add it to the PR description?

Thanks!

@wwoods

This comment has been minimized.

Copy link
Contributor Author

commented Mar 22, 2019

@liamdebeasi

This comment has been minimized.

Copy link
Member

commented Mar 25, 2019

Ok no prob. Do you have some steps to reproduce the original issue? This will help when testing out this PR. Thanks!

@wwoods

This comment has been minimized.

Copy link
Contributor Author

commented Mar 25, 2019

@liamdebeasi

This comment has been minimized.

Copy link
Member

commented Mar 27, 2019

Hi @wwoods,

The steps that you provided do not seem to trigger the issue. Can you re-verify that the steps you sent are correct?

I need to be able to verify the issue before we can get this merged in.

Thanks!

liamdebeasi and others added some commits Apr 16, 2019

@brandyscarney brandyscarney merged commit 20c146e into ionic-team:master Jun 11, 2019

1 check passed

build Workflow: build
Details
@brandyscarney

This comment has been minimized.

Copy link
Member

commented Jun 11, 2019

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.