You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-20 16:22:28 +03:00
dont assume there items is an array
This commit is contained in:
@@ -80,7 +80,7 @@ export default class LazyRenderList extends React.Component {
|
|||||||
const {renderRange} = this.state;
|
const {renderRange} = this.state;
|
||||||
const paddingTop = renderRange.topCount * itemHeight;
|
const paddingTop = renderRange.topCount * itemHeight;
|
||||||
const paddingBottom = renderRange.bottomCount * itemHeight;
|
const paddingBottom = renderRange.bottomCount * itemHeight;
|
||||||
const renderedItems = items.slice(
|
const renderedItems = (items || []).slice(
|
||||||
renderRange.topCount,
|
renderRange.topCount,
|
||||||
renderRange.topCount + renderRange.renderCount,
|
renderRange.topCount + renderRange.renderCount,
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user