fix(statusbadge): handle missing season/episode number (#3526)

pull/3743/head
TheCatLady 1 year ago committed by Mike Kao
parent 175a729377
commit 2b6f6f5d82

@ -166,11 +166,11 @@ const StatusBadge = ({
</span>
{inProgress && (
<>
{mediaType === 'tv' && (
{mediaType === 'tv' && downloadItem[0].episode && (
<span className="ml-1">
{intl.formatMessage(messages.seasonepisodenumber, {
seasonNumber: downloadItem[0].episode?.seasonNumber,
episodeNumber: downloadItem[0].episode?.episodeNumber,
seasonNumber: downloadItem[0].episode.seasonNumber,
episodeNumber: downloadItem[0].episode.episodeNumber,
})}
</span>
)}
@ -219,11 +219,11 @@ const StatusBadge = ({
</span>
{inProgress && (
<>
{mediaType === 'tv' && (
{mediaType === 'tv' && downloadItem[0].episode && (
<span className="ml-1">
{intl.formatMessage(messages.seasonepisodenumber, {
seasonNumber: downloadItem[0].episode?.seasonNumber,
episodeNumber: downloadItem[0].episode?.episodeNumber,
seasonNumber: downloadItem[0].episode.seasonNumber,
episodeNumber: downloadItem[0].episode.episodeNumber,
})}
</span>
)}
@ -272,11 +272,11 @@ const StatusBadge = ({
</span>
{inProgress && (
<>
{mediaType === 'tv' && (
{mediaType === 'tv' && downloadItem[0].episode && (
<span className="ml-1">
{intl.formatMessage(messages.seasonepisodenumber, {
seasonNumber: downloadItem[0].episode?.seasonNumber,
episodeNumber: downloadItem[0].episode?.episodeNumber,
seasonNumber: downloadItem[0].episode.seasonNumber,
episodeNumber: downloadItem[0].episode.episodeNumber,
})}
</span>
)}

Loading…
Cancel
Save