fix channel subs null value extraction, #803

This commit is contained in:
Simon
2025-05-11 10:15:58 +07:00
parent c5f212f520
commit e34da1687e
3 changed files with 15 additions and 3 deletions

View File

@@ -49,7 +49,9 @@ const ChannelList = ({ channelList, refreshChannelList }: ChannelListProps) => {
<h3>
<Link to={Routes.Channel(channel.channel_id)}>{channel.channel_name}</Link>
</h3>
<FormattedNumber text="Subscribers:" number={channel.channel_subs} />
{channel.channel_subs !== null && (
<FormattedNumber text="Subscribers:" number={channel.channel_subs} />
)}
</div>
</div>
<div className="info-box-item">

View File

@@ -38,7 +38,7 @@ const ChannelOverview = ({
<Link to={Routes.ChannelVideo(channelId)}>{channelname}</Link>
</h3>
<FormattedNumber text="Subscribers:" number={channelSubs} />
{channelSubs !== null && <FormattedNumber text="Subscribers:" number={channelSubs} />}
{isAdmin && (
<>