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