From 057e51fd73f511fec0c6669926fb4f0b78952dc6 Mon Sep 17 00:00:00 2001 From: insanity Date: Tue, 29 May 2018 13:58:18 +0900 Subject: [PATCH] sensor reducer bug fix --- .../container/sensor-list/sensor-list.reducer.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/@overflow/sensor/store/container/sensor-list/sensor-list.reducer.ts b/@overflow/sensor/store/container/sensor-list/sensor-list.reducer.ts index c4a0ef4..100f3c7 100644 --- a/@overflow/sensor/store/container/sensor-list/sensor-list.reducer.ts +++ b/@overflow/sensor/store/container/sensor-list/sensor-list.reducer.ts @@ -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; } }