From 0e119b6ba858db629e9c649670a32e9add880aa2 Mon Sep 17 00:00:00 2001 From: tresabhi <43380238+tresabhi@users.noreply.github.com> Date: Wed, 7 Oct 2026 16:27:38 -0500 Subject: [PATCH] optimize awaitable tiers --- packages/website/src/core/awaitables/tiers.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/website/src/core/awaitables/tiers.ts b/packages/website/src/core/awaitables/tiers.ts index a83389b73..0729a3d45 100644 --- a/packages/website/src/core/awaitables/tiers.ts +++ b/packages/website/src/core/awaitables/tiers.ts @@ -2,9 +2,11 @@ import { times } from "lodash-es"; import { api } from "../blitzkit/api"; export const awaitableTiers = api.tankDefinitions().then((tankDefinitions) => { - const maxTier = Math.max( - ...Object.values(tankDefinitions.tanks).map((tank) => tank.tier), - ); + let max = 0; - return times(maxTier, (index) => maxTier - index); + for (const tank of Object.values(tankDefinitions.tanks)) { + if (tank.tier > max) max = tank.tier; + } + + return times(max, (index) => max - index); });