Skip to content

Commit 056db7f

Browse files
Merge pull request #474 from mabdullahsari/patch-1
Fix existing layouts breaking as of 1.0.9
2 parents 72ca1ac + efa5d5d commit 056db7f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Concerns/HasFlexible.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
use Whitecube\NovaFlexibleContent\Layouts\Layout;
1010
use Whitecube\NovaFlexibleContent\Value\FlexibleCast;
1111

12-
1312
trait HasFlexible
1413
{
1514
/**
@@ -122,7 +121,7 @@ protected function getMappedLayout($item, array $layoutMapping)
122121
$name = $item['layout'] ?? null;
123122
$key = $item['key'] ?? null;
124123
$attributes = (array) ($item['attributes'] ?? []);
125-
} elseif (is_a($item, Fluent::class)) {
124+
} elseif (is_a($item, \stdClass::class) || is_a($item, Fluent::class)) {
126125
$name = $item->layout ?? null;
127126
$key = $item->key ?? null;
128127
$attributes = (array) ($item->attributes ?? []);

0 commit comments

Comments
 (0)