Small refactor
Reviewed By: cpojer Differential Revision: D7498659 fbshipit-source-id: 43ad85645e2366a385e08d68172e76e336fdfb1f
This commit is contained in:
parent
cea798c57b
commit
439614891c
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue