Remove unnecessary double test in Navigator

Summary:
_renderScene would unnecessary test if `this.state.transitionFromIndex != null` twice.

The left side and right side of the 'or' statement would always be the same.

For cleaner code I suggest to remove it.
Closes https://github.com/facebook/react-native/pull/10042

Differential Revision: D3923058

fbshipit-source-id: 7466c1f0f24eac3f9f296debd9a5e9f5320aea28
This commit is contained in:
Lord Daniel Zautner 2016-09-26 01:38:01 -07:00 committed by Facebook Github Bot 7
parent 8adf78ffc9
commit 9584480261
1 changed files with 1 additions and 1 deletions

View File

@ -1248,7 +1248,7 @@ var Navigator = React.createClass({
key={'scene_' + getRouteID(route)}
ref={'scene_' + i}
onStartShouldSetResponderCapture={() => {
return (this.state.transitionFromIndex != null) || (this.state.transitionFromIndex != null);
return (this.state.transitionFromIndex != null);
}}
pointerEvents={disabledScenePointerEvents}
style={[styles.baseScene, this.props.sceneStyle, disabledSceneStyle]}>