Skip to content

Commit e2ba80c

Browse files
committed
Use count
1 parent 30becf2 commit e2ba80c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Traits/WithSorting.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function sortBy(string $field): ?string
4444
*/
4545
public function applySorting($query)
4646
{
47-
if (! empty($this->defaultSortColumn) && empty($this->sorts)) {
47+
if (! empty($this->defaultSortColumn) && ! count($this->sorts)) {
4848
return $query->orderBy($this->defaultSortColumn, $this->defaultSortDirection);
4949
}
5050

0 commit comments

Comments
 (0)