uniqBy doesnt have shorthands in production

flatten-status
Nolan Lawson 2018-03-14 23:13:27 -07:00
rodzic 8bd3cf24e3
commit 622b162924
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -81,7 +81,7 @@ const lazilyProcessFreshUpdates = throttle((instanceName, timelineName) => {
export function addStatusOrNotification (instanceName, timelineName, newStatusOrNotification) {
let freshUpdates = store.getForTimeline(instanceName, timelineName, 'freshUpdates') || []
freshUpdates.push(newStatusOrNotification)
freshUpdates = uniqBy(freshUpdates, 'id')
freshUpdates = uniqBy(freshUpdates, _ => _.id)
store.setForTimeline(instanceName, timelineName, {freshUpdates: freshUpdates})
lazilyProcessFreshUpdates(instanceName, timelineName)
}