diff --git a/Libraries/Components/ScrollView/ScrollView.js b/Libraries/Components/ScrollView/ScrollView.js index 29b9d57ca2a..bc57f5cb400 100644 --- a/Libraries/Components/ScrollView/ScrollView.js +++ b/Libraries/Components/ScrollView/ScrollView.js @@ -746,10 +746,9 @@ const ScrollView = createReactClass({ this.props.horizontal && styles.contentContainerHorizontal, this.props.contentContainerStyle, ]; - let style, childLayoutProps; if (__DEV__ && this.props.style) { - style = flattenStyle(this.props.style); - childLayoutProps = ['alignItems', 'justifyContent'] + const style = flattenStyle(this.props.style); + const childLayoutProps = ['alignItems', 'justifyContent'] .filter((prop) => style && style[prop] !== undefined); invariant( childLayoutProps.length === 0,