Fix wrong comparison with votes filtering

This commit is contained in:
Ajay 2024-03-24 13:42:39 -04:00
parent c19d6fe97a
commit 0d9cce0512

View file

@ -181,7 +181,7 @@ async function filterAndSortBranding(videoID: VideoID, returnUserID: boolean, fe
UUID: r.UUID,
userID: returnUserID ? r.userID : undefined
}))
.filter((a) => fetchAll || a.votes > 0 || a.locked)
.filter((a) => fetchAll || a.votes >= 0 || a.locked)
.sort((a, b) => b.votes - a.votes)
.sort((a, b) => +b.locked - +a.locked) as TitleResult[];
@ -197,7 +197,7 @@ async function filterAndSortBranding(videoID: VideoID, returnUserID: boolean, fe
UUID: r.UUID,
userID: returnUserID ? r.userID : undefined
}))
.filter((a) => fetchAll || a.votes > 0 || a.locked) as ThumbnailResult[];
.filter((a) => fetchAll || a.votes >= 0 || a.locked) as ThumbnailResult[];
return {
titles,