fix typo in history preening

This commit is contained in:
Matteo Pagliazzi
2016-01-09 21:17:17 +01:00
parent f55e4f65f9
commit 1d0b05a6df

View File

@@ -50,7 +50,7 @@ export function preenHistory (history, isSubscribed, timezoneOffset) {
return date.isSame(monthsCutOff) || date.isAfter(monthsCutOff);
});
// Aggregate remaining entries by month and year
if (history.length > 0) newHistory.unshift(..._aggregate(aggregateByMonth, 'YYYYMM'));
if (aggregateByMonth.length > 0) newHistory.unshift(..._aggregate(aggregateByMonth, 'YYYYMM'));
if (history.length > 0) newHistory.unshift(..._aggregate(history, 'YYYY'));
return newHistory;