From bb6e353449b94a2b3c3fd2d4dfaa532c387b3e87 Mon Sep 17 00:00:00 2001 From: Anatoly <зpovly19995@gmail.com> Date: Tue, 20 Aug 2024 04:44:43 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A4=D0=B8=D0=BA=D1=81.=20=D0=9F=D1=80=D0=BE?= =?UTF-8?q?=D0=B2=D0=B5=D1=80=D0=BA=D0=B0=20=D0=BD=D0=B0=20=D0=BF=D1=83?= =?UTF-8?q?=D1=81=D1=82=D0=BE=D1=82=D1=83=20=D0=B7=D0=B0=D0=BF=D0=BE=D0=BB?= =?UTF-8?q?=D0=BD=D0=B5=D0=BD=D0=BD=D1=8B=D1=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Fields/Layouts.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Fields/Layouts.php b/src/Fields/Layouts.php index f75663d..ea06315 100644 --- a/src/Fields/Layouts.php +++ b/src/Fields/Layouts.php @@ -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()); @@ -168,7 +168,7 @@ public function getFilledLayouts(): LayoutCollection ->headingAdditionalFields($fields); return $layout->removeButton($this->getRemoveButton()); - })->filter(); + })->filter() : []; return LayoutCollection::make($filled); }