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-1710 If the Design is 'N/A' we no longer show an error message #224

Merged
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
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
Loading