diff --git a/lib/reducers/user-reducer.js b/lib/reducers/user-reducer.js --- a/lib/reducers/user-reducer.js +++ b/lib/reducers/user-reducer.js @@ -369,16 +369,19 @@ ]; } } else if (action.type === findUserIdentitiesActionTypes.success) { - const newUserInfos = action.payload.userInfos.reduce( - (acc, userInfo) => ({ + const newUserInfos = action.payload.userInfos.reduce((acc, userInfo) => { + const existingUserInfo = state.userInfos[userInfo.id]; + if (!existingUserInfo) { + return acc; + } + return { ...acc, [userInfo.id]: { - ...state.userInfos[userInfo.id], + ...existingUserInfo, username: userInfo.username, }, - }), - {}, - ); + }; + }, {}); const userStoreOps: $ReadOnlyArray = convertUserInfosToReplaceUserOps(newUserInfos);