diff --git a/src/Element/ComponentForm.php b/src/Element/ComponentForm.php index 259e4eabb44934d6d401629cdb4004d07a936fff..b90623d7329edf342e12547564c8d7adc3e4189e 100644 --- a/src/Element/ComponentForm.php +++ b/src/Element/ComponentForm.php @@ -270,9 +270,7 @@ class ComponentForm extends ComponentFormBase { '#tag_filter' => $element['#tag_filter'], '#ajax_url' => $element['#ajax_url'] ?? NULL, '#access' => $element['#render_slots'] ?? TRUE, - '#default_value' => [ - 'slots' => $element['#default_value']['slots'] ?? [], - ], + '#default_value' => $element['#default_value']['slots'] ?? NULL, ]; } diff --git a/src/Element/ComponentSlotsForm.php b/src/Element/ComponentSlotsForm.php index 5104e66b0c3a72b913a53f66a695223c442b60cd..063617c1206a362cc60e57f7d09cfdbcba16b278 100644 --- a/src/Element/ComponentSlotsForm.php +++ b/src/Element/ComponentSlotsForm.php @@ -103,7 +103,7 @@ class ComponentSlotsForm extends ComponentFormBase { return $element; } $contexts = $element['#source_contexts'] ?? []; - $configuration = $element['#default_value']['slots'] ?? []; + $configuration = $element['#default_value'] ?? []; $slot_heading = new FormattableMarkup("<p><strong>@title</strong></p>", ["@title" => t("Slots")]); $element[] = [ '#markup' => $slot_heading,