mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2024-11-12 18:04:29 +01:00
Fix wrong comparison with votes filtering
This commit is contained in:
parent
c19d6fe97a
commit
0d9cce0512
1 changed files with 2 additions and 2 deletions
|
@ -181,7 +181,7 @@ async function filterAndSortBranding(videoID: VideoID, returnUserID: boolean, fe
|
||||||
UUID: r.UUID,
|
UUID: r.UUID,
|
||||||
userID: returnUserID ? r.userID : undefined
|
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.votes - a.votes)
|
||||||
.sort((a, b) => +b.locked - +a.locked) as TitleResult[];
|
.sort((a, b) => +b.locked - +a.locked) as TitleResult[];
|
||||||
|
|
||||||
|
@ -197,7 +197,7 @@ async function filterAndSortBranding(videoID: VideoID, returnUserID: boolean, fe
|
||||||
UUID: r.UUID,
|
UUID: r.UUID,
|
||||||
userID: returnUserID ? r.userID : undefined
|
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 {
|
return {
|
||||||
titles,
|
titles,
|
||||||
|
|
Loading…
Reference in a new issue