From eaa67ba1fe6864f5ec2f62c298946f244eface49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com> Date: Tue, 6 Feb 2024 18:29:12 -0600 Subject: [PATCH] fix: use and --- src/core/statistics/deltaTankStats.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/core/statistics/deltaTankStats.ts b/src/core/statistics/deltaTankStats.ts index 7480a6971..08306533a 100644 --- a/src/core/statistics/deltaTankStats.ts +++ b/src/core/statistics/deltaTankStats.ts @@ -11,10 +11,13 @@ export function deltaTankStats( ) { const bTanks = Object.keys(b); const changedTanks = bTanks.filter((id) => { - return time === undefined - ? a[id as unknown as number]?.all.battles !== - b[id as unknown as number].all.battles - : b[id as unknown as number].last_battle_time > time; + return ( + a[id as unknown as number]?.all.battles !== + b[id as unknown as number].all.battles && + (time === undefined + ? true + : b[id as unknown as number].last_battle_time > time) + ); }); const diff = changedTanks.map((id) => { const aTank = a[id as unknown as number] ?? emptyIndividualTankStats;