mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-21 22:19:41 +01:00
core: fix logs sorting
This commit is contained in:
committed by
Ammar Ahmed
parent
dff1c7ed32
commit
cbb0a511a8
@@ -123,9 +123,9 @@ class DatabaseLogManager {
|
||||
}
|
||||
|
||||
return Object.keys(logGroups)
|
||||
.sort((a, b) => new Date(a).getTime() - new Date(b).getTime())
|
||||
.sort((a, b) => b.localeCompare(a, undefined, { numeric: true }))
|
||||
.map((key) => ({
|
||||
key: new Date(key).toLocaleDateString(),
|
||||
key,
|
||||
logs: logGroups[key]?.sort((a, b) => a.timestamp - b.timestamp)
|
||||
}));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user