mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-18 06:44:46 -07:00
Add relatedVideos getter
This commit is contained in:
parent
c45e4b2e9d
commit
5a0e3e58f9
1 changed files with 13 additions and 1 deletions
|
|
@ -128,8 +128,20 @@ export class ListingDetails {
|
|||
return makeApiPathFromEndpoint( this.api.endpoint )
|
||||
}
|
||||
|
||||
get relatedVideos () {
|
||||
if ( Array.isArray( this.api.relatedVideos ) ) {
|
||||
return this.api.relatedVideos
|
||||
}
|
||||
|
||||
if ( !!this.api.payload && Array.isArray( this.api.payload.relatedVideos ) ) {
|
||||
return this.api.payload.relatedVideos
|
||||
}
|
||||
|
||||
return []
|
||||
}
|
||||
|
||||
get hasRelatedVideos () {
|
||||
return Array.isArray( this.api.relatedVideos ) && this.api.relatedVideos.length > 0
|
||||
return this.relatedVideos.length > 0
|
||||
}
|
||||
|
||||
get hasRelatedApps () {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue