0
0
mirror of https://github.com/sp-tarkov/server.git synced 2025-02-13 09:30:45 -05:00

Remove useless length check

This commit is contained in:
Dev 2023-12-01 16:45:31 +00:00
parent e1790ff7a5
commit 52b91cae87

View File

@ -23,11 +23,6 @@ export class WeightedRandomHelper
const itemKeys = Object.keys(itemArray);
const weights = Object.values(itemArray);
if (itemKeys.length !== weights.length)
{
return null;
}
const chosenItem = this.weightedRandom(itemKeys, weights);
return chosenItem.item;