Skip to content

Commit

Permalink
fix: If we have not filters return empty array
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-code-labx committed Apr 17, 2024
1 parent 1f4f75d commit 66db589
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Concerns/InteractsWithRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ protected function filtersFromRequest(): array
$filters = json_encode($filters);
}

if (! $filters) {
return [];
}

$filters = type($filters)->asString();
if (json_decode($filters) !== null) {
$filters = json_decode($filters, true);
Expand Down

0 comments on commit 66db589

Please sign in to comment.