Skip to content

Commit

Permalink
Fix empty fields groups
Browse files Browse the repository at this point in the history
  • Loading branch information
ifox authored Feb 26, 2020
1 parent 5f2d642 commit 84176e4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Repositories/Behaviors/HandleFieldsGroups.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ protected function handleFieldsGroups($fields) {
$fields[$group] = Arr::where(Arr::only($fields, $groupFields), function ($value, $key) {
return !empty($value);
});

if (empty($fields[$group])) {
$fields[$group] = null;
}

Arr::forget($fields, $groupFields);
}

Expand Down

0 comments on commit 84176e4

Please sign in to comment.