Skip to content

Commit

Permalink
🩹 Fix registering field groups with no fields (Fixes #215)
Browse files Browse the repository at this point in the history
  • Loading branch information
Log1x committed Feb 29, 2024
1 parent c3fda03 commit 3815354
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Field.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function getFields(bool $cache = true): array
throw new Exception('Fields must be an array or an instance of Builder.');
}

$fields = ! empty($fields['fields']) ? [$fields] : $fields;
$fields = ! empty($fields['key']) ? [$fields] : $fields;

foreach ($fields as $key => $field) {
$fields[$key] = is_a($field, FieldsBuilder::class)
Expand Down

0 comments on commit 3815354

Please sign in to comment.