Skip to content

Commit 77696ad

Browse files
[5.x] Fix error when editing Bard field with set and no fields (#10971)
1 parent 7444e28 commit 77696ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Fieldtypes/Sets.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public function preProcess($sets)
5555
'instructions' => $set['instructions'] ?? null,
5656
'icon' => $set['icon'] ?? null,
5757
'hide' => $set['hide'] ?? null,
58-
'fields' => collect($set['fields'])->map(function ($field, $i) use ($setId) {
58+
'fields' => collect($set['fields'] ?? [])->map(function ($field, $i) use ($setId) {
5959
return array_merge(FieldTransformer::toVue($field), ['_id' => $setId.'-'.$i]);
6060
})->all(),
6161
];

0 commit comments

Comments
 (0)