diff --git a/src/Fieldtypes/Sets.php b/src/Fieldtypes/Sets.php index e9163dc50d..b9666ba870 100644 --- a/src/Fieldtypes/Sets.php +++ b/src/Fieldtypes/Sets.php @@ -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(), ];