Skip to content

Commit

Permalink
Merge pull request #3120 from GMOD/fix_displaytype_change
Browse files Browse the repository at this point in the history
Fix menu items for changing display type from track menu
  • Loading branch information
garrettjstevens committed Aug 17, 2022
2 parents 58a9eff + ba68634 commit fd576f6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/core/pluggableElementTypes/models/BaseTrackModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,14 @@ export function createBaseTrackModel(
hideDisplay(displayId: string) {
const schema = pluginManager.pluggableConfigSchemaType('display')
const conf = resolveIdentifier(schema, getRoot(self), displayId)
const t = self.displays.filter(d => d.conf === conf)
const t = self.displays.filter(d => d.configuration === conf)
transaction(() => t.forEach(d => self.displays.remove(d)))
return t.length
},
replaceDisplay(oldId: string, newId: string, initialSnapshot = {}) {
const idx = self.displays.findIndex(d => d.conf.displayId === oldId)
const idx = self.displays.findIndex(
d => d.configuration.displayId === oldId,
)
if (idx === -1) {
throw new Error(`could not find display id ${oldId} to replace`)
}
Expand Down

0 comments on commit fd576f6

Please sign in to comment.