From 15b65dab7d75fe42151eb650bf598512a39acb4d Mon Sep 17 00:00:00 2001 From: Daniel Salazar Date: Thu, 16 Oct 2025 00:50:05 -0700 Subject: [PATCH] fix: app monthly usage details error (#1761) --- .../src/services/MeteringService/MeteringService.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/backend/src/services/MeteringService/MeteringService.ts b/src/backend/src/services/MeteringService/MeteringService.ts index c9f40f754..1cb346b29 100644 --- a/src/backend/src/services/MeteringService/MeteringService.ts +++ b/src/backend/src/services/MeteringService/MeteringService.ts @@ -169,16 +169,16 @@ export class MeteringAndBillingService { const appId = actor.type?.app?.uid; if ( appTotals && appId ) { const filteredAppTotals: Record = {}; - let othersTotal: UsageByType | null = null; + let othersTotal: UsageByType = {} as UsageByType; Object.entries(appTotals).forEach(([appKey, appUsage]) => { if ( appKey === appId ) { filteredAppTotals[appKey] = appUsage; } else { Object.entries(appUsage).forEach(([usageKind, amount]) => { - if ( !othersTotal![usageKind] ) { - othersTotal![usageKind] = 0; + if ( !othersTotal[usageKind] ) { + othersTotal[usageKind] = 0; } - othersTotal![usageKind] += amount; + othersTotal[usageKind] += amount; }); } });