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

pull/3536/head
TheCatLady 2 years ago committed by GitHub
parent a761b7dd35
commit 01de972a8f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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