diff --git a/src/Navigator.js b/src/Navigator.js index 08f51df..b41bf96 100644 --- a/src/Navigator.js +++ b/src/Navigator.js @@ -1000,9 +1000,7 @@ var Navigator = createReactClass({ _transitionSceneStyle: function(fromIndex, toIndex, progress, index) { var viewAtIndex = this._sceneRefs[index]; - if (viewAtIndex === null || viewAtIndex === undefined) { - return; - } + if (!viewAtIndex) return; // Use toIndex animation when we move forwards. Use fromIndex when we move back var sceneConfigIndex = fromIndex < toIndex ? toIndex : fromIndex; var sceneConfig = this.state.sceneConfigStack[sceneConfigIndex]; @@ -1010,6 +1008,7 @@ var Navigator = createReactClass({ if (!sceneConfig) { sceneConfig = this.state.sceneConfigStack[sceneConfigIndex - 1]; } + if (!sceneConfig) return; var styleToUse = {}; var useFn = index < fromIndex || index < toIndex ? sceneConfig.animationInterpolators.out :