From 439614891cb0ea5c0eeb6ef4d3bf1bbdec88d659 Mon Sep 17 00:00:00 2001 From: Peter van der Zee Date: Thu, 5 Apr 2018 06:14:54 -0700 Subject: [PATCH] Small refactor Reviewed By: cpojer Differential Revision: D7498659 fbshipit-source-id: 43ad85645e2366a385e08d68172e76e336fdfb1f --- Libraries/Components/ScrollView/ScrollView.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Libraries/Components/ScrollView/ScrollView.js b/Libraries/Components/ScrollView/ScrollView.js index 29b9d57ca..bc57f5cb4 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,