This commit is contained in:
Henry Jameson 2018-08-18 13:41:23 +03:00
parent 23a1000298
commit 0b6f9c62a1
1 changed files with 2 additions and 2 deletions

View File

@ -270,8 +270,8 @@ const addNewNotifications = (state, { dispatch, notifications, older }) => {
const allStatuses = state.allStatuses
const allStatusesObject = state.allStatusesObject
each(notifications, (notification) => {
const action = notification.notice
mergeOrAdd(allStatuses, allStatusesObject, action)
const result = mergeOrAdd(allStatuses, allStatusesObject, notification.notice)
const action = result.item
// Only add a new notification if we don't have one for the same action
if (!find(state.notifications.data, (oldNotification) => oldNotification.action.id === action.id)) {
state.notifications.maxId = Math.max(notification.id, state.notifications.maxId)