Fixed issue in List for checking size for isLast of ListItem

• Fixed:
- issue in List for checking size for isLast of ListItem
This commit is contained in:
mgabdev 2020-12-31 16:39:27 -05:00
parent 33f19a3f7b
commit 2fc8401257
1 changed files with 2 additions and 1 deletions

View File

@ -22,6 +22,7 @@ class List extends ImmutablePureComponent {
} = this.props
const Wrapper = !!scrollKey ? ScrollableList : Dummy
const itemsSize = !!items ? Array.isArray(items) ? items.length : items.size : 0
return (
<Block>
@ -39,7 +40,7 @@ class List extends ImmutablePureComponent {
<ListItem
size={size}
key={`list-item-${i}`}
isLast={items.size - 1 === i}
isLast={itemsSize - 1 === i}
{...item}
/>
))