diff --git a/src/routes/getSkipSegments.js b/src/routes/getSkipSegments.js index c156fa4..fc9eb69 100644 --- a/src/routes/getSkipSegments.js +++ b/src/routes/getSkipSegments.js @@ -43,6 +43,7 @@ function getWeightedRandomChoice(choices, amountOfChoices) { //add it to the chosen ones and remove it from the choices before the next iteration chosen.push(choices[i]); + totalWeight -= choices[i].weight; choices.splice(i, 1); }