diff options
Diffstat (limited to 'routes/energy-usage.js')
| -rw-r--r-- | routes/energy-usage.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/routes/energy-usage.js b/routes/energy-usage.js index 740e29e..eb21eb9 100644 --- a/routes/energy-usage.js +++ b/routes/energy-usage.js @@ -130,9 +130,9 @@ function fillMissingMonths(sparseMonthStats, statsMoment) { let denseMonthStats = []; let maxMonths; - // Dont fill months in months which havent happened yet + // Dont fill in months which exist in the future if(statsMoment.year() === moment().year()) { - maxMonths = moment().month(); + maxMonths = moment().month() + 1; // API months are 1 based } else { maxMonths = 12; |