mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-15 06:35:20 -07:00
Throw for featured apps not array
This commit is contained in:
parent
6a9a3edb5d
commit
d755c6485d
1 changed files with 6 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue