Skip to content

Commit

Permalink
fix: remove duplicates in incoming data
Browse files Browse the repository at this point in the history
  • Loading branch information
ianshade committed Apr 23, 2021
1 parent 5792244 commit e86f170
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/devices/vizMSE.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1295,7 +1295,7 @@ class VizMSEManager extends EventEmitter {

const hashesAndItems: {[hash: string]: VizMSEPlayoutItemContentInternal} = {}

const expectedPlayoutItems = _.filter(this._expectedPlayoutItems, expectedPlayoutItem => {
const expectedPlayoutItems = _.uniq(_.filter(this._expectedPlayoutItems, expectedPlayoutItem => {
const templateName = typeof expectedPlayoutItem.templateName as string | number | undefined
return (
(
Expand All @@ -1304,7 +1304,7 @@ class VizMSEManager extends EventEmitter {
) &&
typeof templateName !== 'undefined'
)
})
}), false, (a) => JSON.stringify(_.pick(a, 'templateName', 'templateData', 'channelName')))

await Promise.all(
_.map(expectedPlayoutItems, async expectedPlayoutItem => {
Expand Down

0 comments on commit e86f170

Please sign in to comment.