Skip to content

Commit

Permalink
Fix watch page breaking when subscriber count is missing (#3794)
Browse files Browse the repository at this point in the history
  • Loading branch information
absidue authored Jul 21, 2023
1 parent b9eb2a7 commit 45a50bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/renderer/views/Watch/Watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ export default defineComponent({
this.isUpcoming = !!result.basic_info.is_upcoming
this.isLiveContent = !!result.basic_info.is_live_content

const subCount = parseLocalSubscriberCount(result.secondary_info.owner.subscriber_count.text)
const subCount = !result.secondary_info.owner.subscriber_count.isEmpty() ? parseLocalSubscriberCount(result.secondary_info.owner.subscriber_count.text) : NaN

if (!isNaN(subCount)) {
this.channelSubscriptionCountText = formatNumber(subCount, subCount >= 10000 ? { notation: 'compact' } : undefined)
Expand Down Expand Up @@ -713,7 +713,7 @@ export default defineComponent({

this.videoTitle = result.title
this.videoViewCount = result.viewCount
this.channelSubscriptionCountText = result.subCountText || 'FT-0'
this.channelSubscriptionCountText = isNaN(result.subCountText) ? '' : result.subCountText
if (this.hideVideoLikesAndDislikes) {
this.videoLikeCount = null
this.videoDislikeCount = null
Expand Down

0 comments on commit 45a50bb

Please sign in to comment.