mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
Merge pull request #6483 from HabitRPG/new-history-preening
fixes for new history preening, allow only 1 history entry per day in…
This commit is contained in:
@@ -50,8 +50,8 @@ export function preenHistory (history, isSubscribed, timezoneOffset) {
|
||||
return date.isSame(monthsCutOff) || date.isAfter(monthsCutOff);
|
||||
});
|
||||
// Aggregate remaining entries by month and year
|
||||
newHistory.unshift(..._aggregate(aggregateByMonth, 'YYYYMM'));
|
||||
newHistory.unshift(..._aggregate(history, 'YYYY'));
|
||||
if (history.length > 0) newHistory.unshift(..._aggregate(aggregateByMonth, 'YYYYMM'));
|
||||
if (history.length > 0) newHistory.unshift(..._aggregate(history, 'YYYY'));
|
||||
|
||||
return newHistory;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user