Skip to content

Commit 8fd72a4

Browse files
committed
office-shared-comments-ui ee041633
1 parent 94c7285 commit 8fd72a4

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
@@ -777,7 +777,9 @@ class VirtualizedList extends React.PureComponent<Props, State> {
777777
}
778778

779779
if (itemCount > 0) {
780-
renderMask.addCells(cellsAroundViewport);
780+
if (cellsAroundViewport.last >= cellsAroundViewport.first) {
781+
renderMask.addCells(cellsAroundViewport);
782+
}
781783

782784
// The initially rendered cells are retained as part of the
783785
// "scroll-to-top" optimization
@@ -968,7 +970,7 @@ class VirtualizedList extends React.PureComponent<Props, State> {
968970
);
969971

970972
return {
971-
cellsAroundViewport: prevState.cellsAroundViewport,
973+
cellsAroundViewport: constrainedCells,
972974
renderMask: VirtualizedList._createRenderMask(newProps, constrainedCells),
973975
};
974976
}

0 commit comments

Comments
 (0)