fix: ensure downloader value is properly checked and converted to number in DownloadGroup component

This commit is contained in:
Moyasee
2025-12-14 11:27:29 +02:00
parent 95a7bc2236
commit 142bd3156c

View File

@@ -412,10 +412,12 @@ function HeroDownloadView({
</div>
)}
{game.download?.downloader && (
{game.download?.downloader !== undefined && (
<div className="download-group__stat-item">
<div className="download-group__stat-content">
<Badge>{DOWNLOADER_NAME[game.download.downloader]}</Badge>
<Badge>
{DOWNLOADER_NAME[Number(game.download.downloader)]}
</Badge>
</div>
</div>
)}
@@ -856,7 +858,9 @@ export function DownloadGroup({
</button>
<div className="download-group__simple-meta">
<div className="download-group__simple-meta-row">
<Badge>{DOWNLOADER_NAME[game.download!.downloader]}</Badge>
<Badge>
{DOWNLOADER_NAME[Number(game.download!.downloader)]}
</Badge>
</div>
<div className="download-group__simple-meta-row">
{extraction?.visibleId === game.id ? (