Page MenuHomePhabricator

D12328.id41682.diff
No OneTemporary

D12328.id41682.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
@@ -272,6 +272,9 @@
const filteredUserIDs = action.payload.userIDs.filter(
id => !state.userInfos[id],
);
+ if (filteredUserIDs.length === 0) {
+ return [state, [], []];
+ }
const newUserInfosArray = filteredUserIDs.map(id => ({
id,
username: null,
@@ -286,15 +289,16 @@
state.userInfos,
userStoreOps,
);
-
- return [
- {
- ...state,
- userInfos: processedUserInfos,
- },
- [],
- userStoreOps,
- ];
+ if (!_isEqual(state.userInfos)(processedUserInfos)) {
+ return [
+ {
+ ...state,
+ userInfos: processedUserInfos,
+ },
+ [],
+ userStoreOps,
+ ];
+ }
} else if (
action.type === joinThreadActionTypes.success ||
action.type === newThreadActionTypes.success

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 17, 10:23 AM (19 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2522257
Default Alt Text
D12328.id41682.diff (982 B)

Event Timeline