From d2afb82fdc6252b20055cceab342619827fe4ab5 Mon Sep 17 00:00:00 2001 From: Made Baruna Date: Wed, 13 Mar 2024 15:55:09 +0800 Subject: [PATCH] Fix max stack exceeded --- src/routes/wish/_rank.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/wish/_rank.svelte b/src/routes/wish/_rank.svelte index 2ef31e2d..8179021f 100644 --- a/src/routes/wish/_rank.svelte +++ b/src/routes/wish/_rank.svelte @@ -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);