Merge pull request #905 from GilgusMaximus/development

Fix 0 (dis)likes displayed as NaN
This commit is contained in:
Luca Hohmann 2020-12-31 12:26:18 +01:00 committed by GitHub
commit 5fe5164ebb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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