Skip to content
This repository was archived by the owner on May 12, 2022. It is now read-only.

Commit 2eb5dfb

Browse files
author
Nik Barham
committed
Whoops - logic for new sortById working in reverse!
1 parent 40b2aff commit 2eb5dfb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Orm/Collection.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ public function sortById(array $listOfIds)
284284
$order = array_values($listOfIds);
285285

286286
return $this->sort(function ($a, $b) use ($order) {
287-
return array_search($b->id, $order) - array_search($a->id, $order);
287+
return array_search($a->id, $order) - array_search($b->id, $order);
288288
});
289289
}
290290

0 commit comments

Comments
 (0)