Skip to content

Commit f0de65b

Browse files
committed
office-shared-comments-ui ee041633
1 parent 2a5503e commit f0de65b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Libraries/Lists/VirtualizedList.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,9 @@ class VirtualizedList extends React.PureComponent<Props, State> {
779779
}
780780

781781
if (itemCount > 0) {
782-
renderMask.addCells(cellsAroundViewport);
782+
if (cellsAroundViewport.last >= cellsAroundViewport.first) {
783+
renderMask.addCells(cellsAroundViewport);
784+
}
783785

784786
// The initially rendered cells are retained as part of the
785787
// "scroll-to-top" optimization
@@ -970,7 +972,7 @@ class VirtualizedList extends React.PureComponent<Props, State> {
970972
);
971973

972974
return {
973-
cellsAroundViewport: prevState.cellsAroundViewport,
975+
cellsAroundViewport: constrainedCells,
974976
renderMask: VirtualizedList._createRenderMask(newProps, constrainedCells),
975977
};
976978
}

0 commit comments

Comments
 (0)