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) {