Skip to content

Commit

Permalink
Merge pull request #224 from tv2/SOF-1710/dontShowErrorMessageForVali…
Browse files Browse the repository at this point in the history
…dEmptyDesign

SOF-1710 If the Design is 'N/A' we no longer show an error message
  • Loading branch information
LindvedKrvang authored Nov 22, 2023
2 parents 7d3ea23 + 83b4bad commit 153a798
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/tv2-common/helpers/graphics/design/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ import {
} from 'tv2-common'
import { SharedGraphicLLayer, SharedOutputLayer, SharedSourceLayer } from 'tv2-constants'

const NON_BASELINE_DESIGN = 'NON_BASELINE_DESIGN'
const NON_BASELINE_DESIGN: string = 'NON_BASELINE_DESIGN'
const VALID_EMPTY_DESIGN_VALUE: string = 'N/A'

export function EvaluateDesignBase(
context: ShowStyleContext,
Expand Down Expand Up @@ -156,6 +157,9 @@ function getVizDesignTimelineObject(config: TV2ShowStyleConfig, design: string):

export function getVizBaselineDesignTimelineObject(context: ShowStyleContext) {
const designReference = context.config.showStyle.GfxDefaults[0].DefaultDesign
if (VALID_EMPTY_DESIGN_VALUE === designReference.value) {
return []
}
const design = context.config.showStyle.GfxDesignTemplates.find(
(designTemplate) => designTemplate._id === designReference.value
)
Expand All @@ -171,6 +175,9 @@ export function getCasparCgBaselineDesignTimelineObjects(
templateName: string
): TSR.TimelineObjCCGTemplate[] {
const designReference = context.config.showStyle.GfxDefaults[0].DefaultDesign
if (VALID_EMPTY_DESIGN_VALUE === designReference.value) {
return []
}
const design = context.config.showStyle.GfxDesignTemplates.find(
(designTemplate) => designTemplate._id === designReference.value
)
Expand Down

0 comments on commit 153a798

Please sign in to comment.