return null if it is passed (#3021)

This commit is contained in:
Vojtech Novak
2017-11-21 15:54:46 +01:00
committed by Spencer Carli
parent 04c075c1bb
commit cc355dcee9

View File

@@ -142,7 +142,10 @@ class Header extends React.PureComponent<Props, State> {
_renderLeftComponent = (props: SceneProps): ?React.Node => {
// $FlowFixMe
const { options } = this.props.getScreenDetails(props.scene);
if (React.isValidElement(options.headerLeft)) {
if (
React.isValidElement(options.headerLeft) ||
options.headerLeft === null
) {
return options.headerLeft;
}
if (props.scene.index === 0) {