mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-19 02:17:09 +00:00
fix(ui): compare last_operation timestamps as dates, not strings
RFC3339 string comparison fails with different timezone offsets. Parse to Date before comparing to ensure correct ordering.
This commit is contained in:
@@ -550,7 +550,7 @@ export default function LogPage() {
|
||||
// Pick the most recent last_operation from the two sources
|
||||
let lastOp = ops?.last_operation;
|
||||
if (audit?.last_operation) {
|
||||
if (!lastOp || audit.last_operation.ts > lastOp.ts) {
|
||||
if (!lastOp || new Date(audit.last_operation.ts).getTime() > new Date(lastOp.ts).getTime()) {
|
||||
lastOp = audit.last_operation;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user