From 5aa8144ad58a99989a0f03de6f202f1d6d59cb02 Mon Sep 17 00:00:00 2001 From: Rory& Date: Sat, 20 Sep 2025 20:03:52 +0200 Subject: [PATCH] Fix monthly totals erroring out when updating records --- index.js | 1 + 1 file changed, 1 insertion(+) diff --git a/index.js b/index.js index 0a7dcce..f11fb56 100644 --- a/index.js +++ b/index.js @@ -104,6 +104,7 @@ function updateRecords(callStats, records) { records.totalCallsEverPlaced = callStats.totalCallsEverPlaced; // Update monthly totals + if (!records.monthlyTotals) records.monthlyTotals = {}; records.monthlyTotals[yesterday.getFullYear().toString()][yesterday.getMonth().toString()] = callStats.totalCallsThisMonth; if (isNewRecord) {