Fix bug where reducer dies on empty operation

This commit is contained in:
Kyle Shockey
2017-04-14 17:15:27 -07:00
parent c7ae644c96
commit 08b3c38b8a

View File

@@ -97,7 +97,10 @@ export default {
}, },
[UPDATE_OPERATION_VALUE]: (state, { payload: { path, value, key } }) => { [UPDATE_OPERATION_VALUE]: (state, { payload: { path, value, key } }) => {
return state.setIn(["resolved", "paths", ...path, key], fromJS(value)) if(state.get(["resolved", "paths", ...path, key])) {
return state.setIn(["resolved", "paths", ...path, key], fromJS(value))
}
return state
}, },
[CLEAR_RESPONSE]: (state, { payload: { path, method } } ) =>{ [CLEAR_RESPONSE]: (state, { payload: { path, method } } ) =>{