Skip to content

Commit bd3892d

Browse files
committed
Fix sorting issue on merged logs
1 parent f0fa347 commit bd3892d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Models/Driver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,6 @@ protected function accumulateRecords(array $filter = []): void
123123

124124
protected function sortRecords(): void
125125
{
126-
usort($this->records, fn($a, $b): int => (int) ($a['datetime']->format('U') > $b['datetime']->format('U')));
126+
usort($this->records, fn(LogRecord $a, LogRecord $b): int => $a['datetime']->format('U') - $b['datetime']->format('U'));
127127
}
128128
}

0 commit comments

Comments
 (0)