forked from cybrespace/pinafore
uniqBy doesnt have shorthands in production
This commit is contained in:
parent
8bd3cf24e3
commit
622b162924
|
@ -81,7 +81,7 @@ const lazilyProcessFreshUpdates = throttle((instanceName, timelineName) => {
|
||||||
export function addStatusOrNotification (instanceName, timelineName, newStatusOrNotification) {
|
export function addStatusOrNotification (instanceName, timelineName, newStatusOrNotification) {
|
||||||
let freshUpdates = store.getForTimeline(instanceName, timelineName, 'freshUpdates') || []
|
let freshUpdates = store.getForTimeline(instanceName, timelineName, 'freshUpdates') || []
|
||||||
freshUpdates.push(newStatusOrNotification)
|
freshUpdates.push(newStatusOrNotification)
|
||||||
freshUpdates = uniqBy(freshUpdates, 'id')
|
freshUpdates = uniqBy(freshUpdates, _ => _.id)
|
||||||
store.setForTimeline(instanceName, timelineName, {freshUpdates: freshUpdates})
|
store.setForTimeline(instanceName, timelineName, {freshUpdates: freshUpdates})
|
||||||
lazilyProcessFreshUpdates(instanceName, timelineName)
|
lazilyProcessFreshUpdates(instanceName, timelineName)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue