mirror of
https://github.com/ajayyy/SponsorBlockServer.git
synced 2025-12-19 22:18:35 +03:00
Fix wrong array being returned for highlight and full video segments
This commit is contained in:
@@ -204,7 +204,7 @@ function getWeightedRandomChoice<T extends VotableObject>(choices: T[], amountOf
|
|||||||
|
|
||||||
// Nothing to filter for
|
// Nothing to filter for
|
||||||
if (amountOfChoices >= choicesWithWeights.length) {
|
if (amountOfChoices >= choicesWithWeights.length) {
|
||||||
return choices;
|
return [...forceIncludedChoices, ...filteredChoices];
|
||||||
}
|
}
|
||||||
|
|
||||||
//iterate and find amountOfChoices choices
|
//iterate and find amountOfChoices choices
|
||||||
|
|||||||
Reference in New Issue
Block a user