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 @@ -57,14 +57,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, @@ -76,7 +76,7 @@ }; } if (action.payload.sessionChange.cookieInvalidated) { - state = { + return { ...state, keyserverInfos: { ...state.keyserverInfos, @@ -96,7 +96,7 @@ ) { const { updatesCurrentAsOf } = action.payload; for (const keyserverID in updatesCurrentAsOf) { - state = { + return { ...state, keyserverInfos: { ...state.keyserverInfos, @@ -110,7 +110,7 @@ } } else if (action.type === fullStateSyncActionType) { const { keyserverID } = action.payload; - state = { + return { ...state, keyserverInfos: { ...state.keyserverInfos, @@ -132,7 +132,7 @@ break; } } - state = { + return { ...state, keyserverInfos: { ...state.keyserverInfos, @@ -149,7 +149,7 @@ action.payload.updatesResult.currentAsOf, state.keyserverInfos[ashoatKeyserverID].updatesCurrentAsOf, ); - state = { + return { ...state, keyserverInfos: { ...state.keyserverInfos, @@ -160,7 +160,7 @@ }, }; } else if (action.type === setURLPrefix) { - state = { + return { ...state, keyserverInfos: { ...state.keyserverInfos, @@ -172,7 +172,7 @@ }; } else if (action.type === updateLastCommunicatedPlatformDetailsActionType) { const { keyserverID } = action.payload; - state = { + return { ...state, keyserverInfos: { ...state.keyserverInfos, @@ -184,7 +184,7 @@ }; } else if (action.type === updateConnectionStatusActionType) { const { keyserverID, status } = action.payload; - state = { + return { ...state, keyserverInfos: { ...state.keyserverInfos, @@ -200,7 +200,7 @@ }; } else if (action.type === unsupervisedBackgroundActionType) { const { keyserverID } = action.payload; - state = { + return { ...state, keyserverInfos: { ...state.keyserverInfos, @@ -237,7 +237,7 @@ ], }; - state = { + return { ...state, keyserverInfos: { ...state.keyserverInfos, @@ -265,7 +265,7 @@ }, }; } - state = { + return { ...state, keyserverInfos, }; @@ -283,7 +283,7 @@ }, }; - state = { + return { ...state, keyserverInfos, }; @@ -297,7 +297,7 @@ } else { lateResponsesSet.delete(messageID); } - state = { + return { ...state, keyserverInfos: { ...state.keyserverInfos, @@ -312,7 +312,7 @@ }; } else if (action.type === updateDisconnectedBarActionType) { const { keyserverID } = action.payload; - state = { + return { ...state, keyserverInfos: { ...state.keyserverInfos, @@ -334,7 +334,7 @@ deviceToken: deviceTokens[keyserverID], }; } - state = { + return { ...state, keyserverInfos, };