diff --git a/client/app/scripts/reducers/root.js b/client/app/scripts/reducers/root.js index 8bbc9ca67..13f60fb4b 100644 --- a/client/app/scripts/reducers/root.js +++ b/client/app/scripts/reducers/root.js @@ -606,7 +606,8 @@ export function rootReducer(state = initialState, action) { state = state.set('errorUrl', null); state = state.update('topologyUrlsById', topologyUrlsById => topologyUrlsById.clear()); state = processTopologies(state, action.topologies); - if (!state.get('currentTopologyId')) { + const currentTopologyId = state.get('currentTopologyId'); + if (!currentTopologyId || !findTopologyById(state.get('topologies'), currentTopologyId)) { state = state.set('currentTopologyId', getDefaultTopology(state.get('topologies'))); log(`Set currentTopologyId to ${state.get('currentTopologyId')}`); }