Skip to content
Permalink
Browse files

fix(virtual-scroll): don't crash with an empty cell list (#17799)

  • Loading branch information...
wwoods authored and brandyscarney committed Jun 11, 2019
1 parent 8d2a47e commit 20c146e1e577fdbbfc06e1833fc0d78ebdb3aaf9
Showing with 1 addition and 1 deletion.
  1. +1 −1 core/src/components/virtual-scroll/virtual-scroll-utils.ts
@@ -181,7 +181,7 @@ export function getShouldUpdate(dirtyIndex: number, currentRange: Range, range:
}

export function findCellIndex(cells: Cell[], index: number): number {
const max = cells[cells.length - 1].index || 0;
const max = cells.length > 0 ? cells[cells.length - 1].index : 0;
if (index === 0) {
return 0;
} else if (index === max + 1) {

0 comments on commit 20c146e

Please sign in to comment.
You can’t perform that action at this time.