Taking out object spread operator (#1311)

* Changed eslint channel in codeclimate.yml for object spread

* Revert "Changed eslint channel in codeclimate.yml for object spread"

This reverts commit b9deb8ce84478f9c8f48ca7d41662e7222f40376.

* Took out the object spread operator
This commit is contained in:
vera-liu 2016-10-12 15:54:51 -07:00 committed by GitHub
parent 451860afca
commit b785d27241

View File

@ -11,10 +11,11 @@ const setFormInViz = function (state, action) {
const setVizInState = function (state, action) {
switch (action.type) {
case actions.SET_FORM_DATA:
return {
...state,
formData: setFormInViz(state.formData, action),
};
return Object.assign(
{},
state,
{ formData: setFormInViz(state.formData, action) }
);
default:
return state;
}
@ -74,10 +75,11 @@ export const exploreReducer = function (state, action) {
return Object.assign({}, state, { datasourceType: action.datasourceType });
},
[actions.SET_FORM_DATA]() {
return {
...state,
viz: setVizInState(state.viz, action),
};
return Object.assign(
{},
state,
{ viz: setVizInState(state.viz, action) }
);
},
};
if (action.type in actionHandlers) {