Skip to content

Commit

Permalink
Fixed #2066 - DataView throws an exception when the last page is reac…
Browse files Browse the repository at this point in the history
…hed using Paginator
  • Loading branch information
mertsincan committed Jun 4, 2021
1 parent cb8deac commit 57b596a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/dataview/DataView.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,8 @@ export class DataView extends Component {
let items = [];

for (let i = first; i < last; i++) {
items.push(<DataViewItem key={i} template={this.props.itemTemplate} layout={this.props.layout} item={value[i]} />);
const val = value[i];
val && items.push(<DataViewItem key={i} template={this.props.itemTemplate} layout={this.props.layout} item={val} />);
}

return items;
Expand Down

0 comments on commit 57b596a

Please sign in to comment.