diff --git a/helpers/structured-data.js b/helpers/structured-data.js index a4800fd..126aafc 100644 --- a/helpers/structured-data.js +++ b/helpers/structured-data.js @@ -5,6 +5,12 @@ function makeFeaturedAppsString ( featuredApps ) { export function buildVideoStructuredData ( video, featuredApps, options ) { // console.log('video', video) + // Throw for missing featured apps + if ( Array.isArray(featuredApps) === false ) { + console.warn( 'featuredApps not array', featuredApps ) + throw new Error('featuredApps must be an array of objects') + } + const { siteUrl } = options