Skip to content

Commit

Permalink
SOF-1709 When the Schema value is 'N/A' we no longer throw en error
Browse files Browse the repository at this point in the history
  • Loading branch information
LindvedKrvang committed Nov 22, 2023
1 parent 7d3ea23 commit f9bd632
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/tv2-common/cues/gfx-schema-generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,17 @@ import {
import { CueType, SharedGraphicLLayer, SharedOutputLayer, SharedSourceLayer } from 'tv2-constants'
import { DveLoopGenerator } from '../helpers/graphics/caspar/dve-loop-generator'

const NON_BASELINE_SCHEMA = 'NON_BASELINE_SCHEMA'
const NON_BASELINE_SCHEMA: string = 'NON_BASELINE_SCHEMA'
const VALID_EMPTY_SCHEMA_VALUE: string = 'N/A'

export class GfxSchemaGenerator {
constructor(private dveLoopGenerator: DveLoopGenerator) {}

public createBaselineTimelineObjectsFromGfxDefaults(context: ShowStyleContext): TSR.TSRTimelineObjBase[] {
const schemaId = context.config.showStyle.GfxDefaults[0].DefaultSchema.value
const schemaId: string = context.config.showStyle.GfxDefaults[0].DefaultSchema.value
if (VALID_EMPTY_SCHEMA_VALUE === schemaId) {
return []
}
const schema: TableConfigGfxSchema | undefined = context.config.showStyle.GfxSchemaTemplates.find(
(s) => s._id === schemaId
)
Expand Down

0 comments on commit f9bd632

Please sign in to comment.