dont assume there items is an array

pull/21833/head
Bruno Windels 2019-02-13 18:49:09 +01:00
parent 42409691b3
commit e51f279f36
1 changed files with 1 additions and 1 deletions

View File

@ -80,7 +80,7 @@ export default class LazyRenderList extends React.Component {
const {renderRange} = this.state;
const paddingTop = renderRange.topCount * itemHeight;
const paddingBottom = renderRange.bottomCount * itemHeight;
const renderedItems = items.slice(
const renderedItems = (items || []).slice(
renderRange.topCount,
renderRange.topCount + renderRange.renderCount,
);