File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff 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 }
Original file line number Diff line number Diff line change @@ -44,8 +44,8 @@ public function it_simple_create(): void
4444
4545 $ model = TestModel::query ()->first ();
4646
47- $ first = static fn (TestModel $ model ): array => $ model ->data ->findByName ('first ' )->get ('json ' );
48- $ second = static fn (TestModel $ model ): array => $ model ->data ->findByName ('second ' )->get ('json ' );
47+ $ first = static fn (TestModel $ model ): array => $ model ->data ->findByName ('first ' )->get ('json ' );
48+ $ second = static fn (TestModel $ model ): array => $ model ->data ->findByName ('second ' )->get ('json ' );
4949
5050 $ this ->assertEquals (['key 1 ' => 'value 1 ' , 'key 2 ' => 'value 2 ' ], $ first ($ model ));
5151 $ this ->assertEquals ([['title ' => 'Title 1 ' , 'image ' => $ image ->hashName ()]], $ second ($ model ));
You can’t perform that action at this time.
0 commit comments