From 5cca68bd0299a92044b637723b08e37b9893aa8a Mon Sep 17 00:00:00 2001 From: Muhammed Haque Date: Wed, 14 Nov 2018 16:54:44 +0000 Subject: [PATCH] #33 - Check scene is not null before setting props when clearing transformation --- src/Navigator.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Navigator.js b/src/Navigator.js index 08f51df..407569d 100644 --- a/src/Navigator.js +++ b/src/Navigator.js @@ -725,7 +725,8 @@ var Navigator = createReactClass({ _clearTransformations: function(sceneIndex) { const defaultStyle = flattenStyle([DEFAULT_SCENE_STYLE]); - this._sceneRefs[sceneIndex].setNativeProps({ style: defaultStyle }); + this._sceneRefs[sceneIndex] && + this._sceneRefs[sceneIndex].setNativeProps({ style: defaultStyle }); }, _onAnimationStart: function() {