Skip to content

Commit

Permalink
Taking out object spread operator (#1311)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
vera-liu authored Oct 12, 2016
1 parent 451860a commit b785d27
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions caravel/assets/javascripts/explorev2/reducers/exploreReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit b785d27

Please sign in to comment.