diff --git a/lib/reducers/keyserver-reducer.js b/lib/reducers/keyserver-reducer.js --- a/lib/reducers/keyserver-reducer.js +++ b/lib/reducers/keyserver-reducer.js @@ -46,14 +46,14 @@ keyserverInfos[keyserverID] = { ...keyserverInfos[keyserverID], cookie }; } - state = { + return { ...state, keyserverInfos, }; } else if (action.type === setNewSessionActionType) { const { keyserverID } = action.payload; if (action.payload.sessionChange.cookie !== undefined) { - state = { + return { ...state, keyserverInfos: { ...state.keyserverInfos, @@ -65,7 +65,7 @@ }; } if (action.payload.sessionChange.cookieInvalidated) { - state = { + return { ...state, keyserverInfos: { ...state.keyserverInfos, @@ -85,7 +85,7 @@ ) { const { updatesCurrentAsOf } = action.payload; for (const keyserverID in updatesCurrentAsOf) { - state = { + return { ...state, keyserverInfos: { ...state.keyserverInfos, @@ -99,7 +99,7 @@ } } else if (action.type === fullStateSyncActionType) { const { keyserverID } = action.payload; - state = { + return { ...state, keyserverInfos: { ...state.keyserverInfos, @@ -121,7 +121,7 @@ break; } } - state = { + return { ...state, keyserverInfos: { ...state.keyserverInfos, @@ -138,7 +138,7 @@ action.payload.updatesResult.currentAsOf, state.keyserverInfos[ashoatKeyserverID].updatesCurrentAsOf, ); - state = { + return { ...state, keyserverInfos: { ...state.keyserverInfos, @@ -149,7 +149,7 @@ }, }; } else if (action.type === setURLPrefix) { - state = { + return { ...state, keyserverInfos: { ...state.keyserverInfos, @@ -161,7 +161,7 @@ }; } else if (action.type === updateLastCommunicatedPlatformDetailsActionType) { const { keyserverID } = action.payload; - state = { + return { ...state, keyserverInfos: { ...state.keyserverInfos, @@ -173,7 +173,7 @@ }; } else if (action.type === updateConnectionStatusActionType) { const { keyserverID, status } = action.payload; - state = { + return { ...state, keyserverInfos: { ...state.keyserverInfos, @@ -189,7 +189,7 @@ }; } else if (action.type === unsupervisedBackgroundActionType) { const { keyserverID } = action.payload; - state = { + return { ...state, keyserverInfos: { ...state.keyserverInfos, @@ -226,7 +226,7 @@ ], }; - state = { + return { ...state, keyserverInfos: { ...state.keyserverInfos, @@ -254,7 +254,7 @@ }, }; } - state = { + return { ...state, keyserverInfos, }; @@ -274,7 +274,7 @@ }, }; } - state = { + return { ...state, keyserverInfos, }; @@ -288,7 +288,7 @@ } else { lateResponsesSet.delete(messageID); } - state = { + return { ...state, keyserverInfos: { ...state.keyserverInfos, @@ -303,7 +303,7 @@ }; } else if (action.type === updateDisconnectedBarActionType) { const { keyserverID } = action.payload; - state = { + return { ...state, keyserverInfos: { ...state.keyserverInfos, @@ -325,7 +325,7 @@ deviceToken: deviceTokens[keyserverID], }; } - state = { + return { ...state, keyserverInfos, };