Fix ListEmptyComponent is rendered upside down when using inverted flag. (#21496)

Summary:
Fix ListEmptyComponent is rendered upside down when using inverted flag.

Fixes #21196
Pull Request resolved: https://github.com/facebook/react-native/pull/21496

Differential Revision: D13334437

Pulled By: hramos

fbshipit-source-id: b34a9a0a153862d3d5dbe410ab0a6c66a8cfcffd
This commit is contained in:
hyochan 2018-12-04 18:46:43 -08:00 committed by Facebook Github Bot
parent 7e4f92bc19
commit 198eb02697
1 changed files with 1 additions and 1 deletions

View File

@ -934,7 +934,7 @@ class VirtualizedList extends React.PureComponent<Props, State> {
: this.props.inverted,
stickyHeaderIndices,
};
if (inversionStyle) {
if (inversionStyle && itemCount !== 0) {
/* $FlowFixMe(>=0.70.0 site=react_native_fb) This comment suppresses an
* error found when Flow v0.70 was deployed. To see the error delete
* this comment and run Flow. */