Skip to content

Commit

Permalink
Filter out empty values in keyed array field
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanmcclean committed Nov 18, 2024
1 parent 15128bc commit 27b2b9d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Fieldtypes/Arr.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ public function process($data)
->all();
}

if ($this->isKeyed()) {
return collect($data)->filter()->all();
}

return $data;
}

Expand Down

0 comments on commit 27b2b9d

Please sign in to comment.