diff --git a/src/ExNavigationReducer.js b/src/ExNavigationReducer.js index 1d35c73..5bddf28 100644 --- a/src/ExNavigationReducer.js +++ b/src/ExNavigationReducer.js @@ -81,6 +81,10 @@ class ExNavigationReducer { } static [ActionTypes.REMOVE_NAVIGATOR](state, { navigatorUID }) { + const navigatorsKeys = Object.keys(state.navigators) + if (!navigatorsKeys.includes(navigatorUID)) { + return state + } const currentNavigatorUID = (navigatorsToRestore.length && navigatorsToRestore[navigatorsToRestore.length - 1]) ||