Fixes sending the default topologyOptions to the /api

- Which fails sometimes as we overwrite them whatever we find in the
  url state. Url state is not complete anymore so this doesn't work
This commit is contained in:
Simon Howe
2018-05-24 17:41:37 +02:00
parent ca3dacdd70
commit 1353eb5506

View File

@@ -688,7 +688,8 @@ export function rootReducer(state = initialState, action) {
pinnedMetricType: action.state.pinnedMetricType,
});
if (action.state.topologyOptions) {
state = state.set('topologyOptions', fromJS(action.state.topologyOptions));
const options = getDefaultTopologyOptions(state).mergeDeep(action.state.topologyOptions);
state = state.set('topologyOptions', options);
}
if (action.state.topologyViewMode) {
state = state.set('topologyViewMode', action.state.topologyViewMode);