diff --git a/src/tv2-common/helpers/graphics/design/index.ts b/src/tv2-common/helpers/graphics/design/index.ts index 30a5df89..e2f1eb5b 100644 --- a/src/tv2-common/helpers/graphics/design/index.ts +++ b/src/tv2-common/helpers/graphics/design/index.ts @@ -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, @@ -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 ) @@ -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 )