Fix max stack exceeded

This commit is contained in:
Made Baruna 2024-03-13 15:55:09 +08:00
parent d3e68c22f3
commit d2afb82fdc

View file

@ -166,7 +166,7 @@
const sorted = [];
for (const item of data) {
total += item[1];
sorted.push(...new Array(item[1]).fill(item[0]));
sorted.concat(new Array(item[1]).fill(item[0]));
}
medianWinRateOff[rarity] = (sorted[Math.round(sorted.length / 2)] * 100).toFixed(2);