js:fix list renderBunchedItems array size <0
This commit is contained in:
@@ -106,7 +106,7 @@ export class List extends Superview implements IList {
|
||||
|
||||
private renderBunchedItems(start: number, length: number) {
|
||||
this.ignoreDirtyCallOnce = true
|
||||
return new Array(Math.min(length, this.itemCount - start)).fill(0).map((_, idx) => {
|
||||
return new Array(Math.max(0, Math.min(length, this.itemCount - start))).fill(0).map((_, idx) => {
|
||||
const listItem = this.getItem(start + idx)
|
||||
return listItem.toModel()
|
||||
})
|
||||
|
Reference in New Issue
Block a user