Skip to content

Commit

Permalink
[5.x] Fix error when editing Bard field with set and no fields (#10971)
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanmcclean authored Oct 18, 2024
1 parent 7444e28 commit 77696ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Fieldtypes/Sets.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function preProcess($sets)
'instructions' => $set['instructions'] ?? null,
'icon' => $set['icon'] ?? null,
'hide' => $set['hide'] ?? null,
'fields' => collect($set['fields'])->map(function ($field, $i) use ($setId) {
'fields' => collect($set['fields'] ?? [])->map(function ($field, $i) use ($setId) {
return array_merge(FieldTransformer::toVue($field), ['_id' => $setId.'-'.$i]);
})->all(),
];
Expand Down

0 comments on commit 77696ad

Please sign in to comment.