DailySorted should not break pinia utils

This commit is contained in:
Matthias 2022-10-30 12:57:05 +01:00
parent 0361fc1424
commit 72be3103dc

View File

@ -163,7 +163,9 @@ export function createBotSubStore(botId: string, botName: string) {
dailyStatsSorted: (state): DailyReturnValue => { dailyStatsSorted: (state): DailyReturnValue => {
return { return {
...state.dailyStats, ...state.dailyStats,
data: Object.values(state.dailyStats.data).sort((a, b) => (a.date > b.date ? 1 : -1)), data: state.dailyStats.data
? Object.values(state.dailyStats.data).sort((a, b) => (a.date > b.date ? 1 : -1))
: [],
}; };
}, },
}, },