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:
parent
8adf78ffc9
commit
9584480261
|
@ -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]}>
|
||||
|
|
Loading…
Reference in New Issue