I am trying to copy a state with slice(), then manipulate it and create a new state
this is my Reducer:
case types.LOAD_AMOUNT_CHECKINS_SUCCESS: {
let buildings = state.buildings.slice();
buildings['devices_error'] = action.checkins['error];
.
.
.
return Object.assign({}, state,
{buildings: buildings}
);
}
but applying slice() returns me: []
Where I have the error?
state.buildingsarray before slicing ?