Skip to content

Commit

Permalink
Filter out empty values from getUniqueAuthorsWithAuthorityNames
Browse files Browse the repository at this point in the history
  • Loading branch information
eronisko committed Mar 14, 2024
1 parent f404d5a commit 2e831a8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions app/Item.php
Original file line number Diff line number Diff line change
Expand Up @@ -399,9 +399,7 @@ public function getAuthorsWithAuthoritiesAttribute()

public function getUniqueAuthorsWithAuthorityNames()
{
return $this->authors_with_authorities
->pluck('name')
->toArray();
return $this->authors_with_authorities->pluck('name')->filter();
}

public function getFirstAuthorAttribute($value)
Expand Down

0 comments on commit 2e831a8

Please sign in to comment.