sensor reducer bug fix
This commit is contained in:
parent
740e245cd7
commit
057e51fd73
|
@ -15,11 +15,11 @@ export function reducer(state = initialState, action: Actions): State {
|
|||
}
|
||||
|
||||
case ActionType.ReadAllByDomainIDSuccess: {
|
||||
return sensorListContainerAdapter.setAll(action.payload.content, {...state, page: action.payload, pending: false});
|
||||
return sensorListContainerAdapter.setAll(action.payload.content, { ...state, page: action.payload, pending: false });
|
||||
}
|
||||
|
||||
case ActionType.ReadAllByDomainIDFailure: {
|
||||
return sensorListContainerAdapter.setError(action.payload, {...state, page: null, pending: false});
|
||||
return sensorListContainerAdapter.setError(action.payload, { ...state, page: null, pending: false });
|
||||
}
|
||||
|
||||
case ActionType.Read: {
|
||||
|
@ -30,11 +30,11 @@ export function reducer(state = initialState, action: Actions): State {
|
|||
}
|
||||
|
||||
case ActionType.ReadSuccess: {
|
||||
return sensorListContainerAdapter.setOne(action.payload, {...state, page: null, pending: false});
|
||||
return sensorListContainerAdapter.setOne(action.payload, { ...state, page: null, pending: false });
|
||||
}
|
||||
|
||||
case ActionType.ReadFailure: {
|
||||
return sensorListContainerAdapter.setError(action.payload, {...state, pending: false});
|
||||
return sensorListContainerAdapter.setError(action.payload, { ...state, pending: false });
|
||||
}
|
||||
|
||||
case ActionType.Modify: {
|
||||
|
@ -51,5 +51,8 @@ export function reducer(state = initialState, action: Actions): State {
|
|||
case ActionType.ModifyFailure: {
|
||||
return sensorListContainerAdapter.setError(action.payload, state);
|
||||
}
|
||||
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user