Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SOF-1709 When the Schema value is 'N/A' we no longer throw an error #225

Merged
merged 1 commit into from
Nov 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading