Skip to content

Commit 3753e4c

Browse files
authored
Merge pull request #12 from povly/master
При создании страницы выдает ошибку
2 parents 92ec7ac + 7b330cd commit 3753e4c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Fields/Layouts.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public function getFilledLayouts(): LayoutCollection
125125
);
126126
}
127127

128-
$filled = $values->map(function (LayoutItem $data) use ($layouts) {
128+
$filled = $values ? $values->map(function (LayoutItem $data) use ($layouts) {
129129
/** @var ?Layout $layout */
130130
$layout = $layouts->findByName($data->getName());
131131

@@ -168,7 +168,7 @@ public function getFilledLayouts(): LayoutCollection
168168
->headingAdditionalFields($fields);
169169

170170
return $layout->removeButton($this->getRemoveButton());
171-
})->filter();
171+
})->filter() : [];
172172

173173
return LayoutCollection::make($filled);
174174
}

0 commit comments

Comments
 (0)