fix error in updates
This commit is contained in:
parent
650071568d
commit
6a3345fe67
|
@ -30,8 +30,8 @@ async function handleFreshChanges (instanceName, timelineName) {
|
||||||
|
|
||||||
await database.insertTimelineItems(instanceName, timelineName, updates)
|
await database.insertTimelineItems(instanceName, timelineName, updates)
|
||||||
|
|
||||||
let itemIdsToAdd = store.getForTimeline(instanceName, timelineName, 'itemIdsToAdd')
|
let itemIdsToAdd = store.getForTimeline(instanceName, timelineName, 'itemIdsToAdd') || []
|
||||||
if (itemIdsToAdd && itemIdsToAdd.length) {
|
if (updates && updates.length) {
|
||||||
itemIdsToAdd = itemIdsToAdd.concat(updates.map(_ => _.id))
|
itemIdsToAdd = itemIdsToAdd.concat(updates.map(_ => _.id))
|
||||||
store.setForTimeline(instanceName, timelineName, {itemIdsToAdd: itemIdsToAdd})
|
store.setForTimeline(instanceName, timelineName, {itemIdsToAdd: itemIdsToAdd})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue