From 4da7a40e82b3305b48115be365960b6c84e92d82 Mon Sep 17 00:00:00 2001 From: Rabursky Date: Wed, 11 Jan 2017 17:30:34 +0000 Subject: [PATCH] Ignoring prevState if navigation state has been replaced --- NavigationScenesReducer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NavigationScenesReducer.js b/NavigationScenesReducer.js index 9fe5781..48fc4a9 100644 --- a/NavigationScenesReducer.js +++ b/NavigationScenesReducer.js @@ -110,7 +110,7 @@ function NavigationScenesReducer( freshScenes.set(key, scene); }); - if (prevState) { + if (prevState && nextState.key === prevState.key) { // Look at the previous children and classify any removed scenes as `stale`. prevState.children.forEach((navigationState, index) => { const key = SCENE_KEY_PREFIX + navigationState.key;