mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -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 ) {
|
export function buildVideoStructuredData ( video, featuredApps, options ) {
|
||||||
// console.log('video', video)
|
// 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 {
|
const {
|
||||||
siteUrl
|
siteUrl
|
||||||
} = options
|
} = options
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue