Check video likes and dislikes for NaN

This commit is contained in:
Luca 2020-12-31 12:22:26 +01:00
parent 8aaa70744e
commit 24d15f6151
1 changed files with 2 additions and 2 deletions

View File

@ -264,8 +264,8 @@ export default Vue.extend({
this.videoLikeCount = null this.videoLikeCount = null
this.videoDislikeCount = null this.videoDislikeCount = null
} else { } else {
this.videoLikeCount = result.videoDetails.likes this.videoLikeCount = isNaN(result.videoDetails.likes) ? 0 : result.videoDetails.likes
this.videoDislikeCount = result.videoDetails.dislikes this.videoDislikeCount = isNaN(result.videoDetails.dislikes) ? 0 : result.videoDetails.dislikes
} }
this.isLive = result.player_response.videoDetails.isLive this.isLive = result.player_response.videoDetails.isLive
this.isLiveContent = result.player_response.videoDetails.isLiveContent this.isLiveContent = result.player_response.videoDetails.isLiveContent