From 24d15f6151be6666acf4a51155fa77e3c9903511 Mon Sep 17 00:00:00 2001 From: Luca Date: Thu, 31 Dec 2020 12:22:26 +0100 Subject: [PATCH] Check video likes and dislikes for NaN --- src/renderer/views/Watch/Watch.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/views/Watch/Watch.js b/src/renderer/views/Watch/Watch.js index 275d5152..6f186420 100644 --- a/src/renderer/views/Watch/Watch.js +++ b/src/renderer/views/Watch/Watch.js @@ -264,8 +264,8 @@ export default Vue.extend({ this.videoLikeCount = null this.videoDislikeCount = null } else { - this.videoLikeCount = result.videoDetails.likes - this.videoDislikeCount = result.videoDetails.dislikes + this.videoLikeCount = isNaN(result.videoDetails.likes) ? 0 : result.videoDetails.likes + this.videoDislikeCount = isNaN(result.videoDetails.dislikes) ? 0 : result.videoDetails.dislikes } this.isLive = result.player_response.videoDetails.isLive this.isLiveContent = result.player_response.videoDetails.isLiveContent