Page MenuHomePhabricator

D13494.diff
No OneTemporary

D13494.diff

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<UserStoreOperation> =
convertUserInfosToReplaceUserOps(newUserInfos);

File Metadata

Mime Type
text/plain
Expires
Mon, Sep 30, 8:39 AM (21 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2204274
Default Alt Text
D13494.diff (904 B)

Event Timeline