diff --git a/frontend/src/utils/index.ts b/frontend/src/utils/index.ts index f33267c58..bbd45f328 100644 --- a/frontend/src/utils/index.ts +++ b/frontend/src/utils/index.ts @@ -122,7 +122,10 @@ export function getDownloadPath({ if (fileIDs.length > 0) { queryParams.append("file_ids", fileIDs.join(",")); } - return `/api/roms/${rom.id}/content/${rom.fs_name}?${queryParams.toString()}`; + const queryString = queryParams.toString(); + return `/api/roms/${rom.id}/content/${rom.fs_name}${ + queryString ? `?${queryString}` : "" + }`; } export function getDownloadLink({