uniqBy doesnt have shorthands in production

This commit is contained in:
Nolan Lawson 2018-03-14 23:13:27 -07:00
parent 8bd3cf24e3
commit 622b162924

View file

@ -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)
}