Skip to content

Commit

Permalink
Merge pull request #1 from povly/fix-filled-layouts
Browse files Browse the repository at this point in the history
Фикс. Проверка на пустоту заполненных
  • Loading branch information
povly authored Aug 20, 2024
2 parents 8b4de67 + bb6e353 commit 7b330cd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Fields/Layouts.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public function getFilledLayouts(): LayoutCollection
);
}

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

Expand Down Expand Up @@ -168,7 +168,7 @@ public function getFilledLayouts(): LayoutCollection
->headingAdditionalFields($fields);

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

return LayoutCollection::make($filled);
}
Expand Down

0 comments on commit 7b330cd

Please sign in to comment.