Skip to content

Commit

Permalink
Merge pull request #101 from lara-zeus/fix-global-search
Browse files Browse the repository at this point in the history
fix in global search
  • Loading branch information
atmonshi authored Aug 2, 2024
2 parents ddb603a + 035f3b2 commit 07e22cc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Concerns/CanGloballySearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ public function getGloballySearchableAttributes(): array

public function getGlobalAttributes(string $class): array
{
return array_merge(
(new static())::get()->defaultGloballySearchableAttributes,
return optional(array_merge(
(new static)::get()->defaultGloballySearchableAttributes,
$this->globallySearchableAttributes
)[$class];
))[$class] ?? [$class];
}
}

0 comments on commit 07e22cc

Please sign in to comment.