Skip to content

Commit

Permalink
Merge pull request #474 from mabdullahsari/patch-1
Browse files Browse the repository at this point in the history
Fix existing layouts breaking as of 1.0.9
  • Loading branch information
toonvandenbos authored Jul 6, 2023
2 parents 72ca1ac + efa5d5d commit 056db7f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Concerns/HasFlexible.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
use Whitecube\NovaFlexibleContent\Layouts\Layout;
use Whitecube\NovaFlexibleContent\Value\FlexibleCast;


trait HasFlexible
{
/**
Expand Down Expand Up @@ -122,7 +121,7 @@ protected function getMappedLayout($item, array $layoutMapping)
$name = $item['layout'] ?? null;
$key = $item['key'] ?? null;
$attributes = (array) ($item['attributes'] ?? []);
} elseif (is_a($item, Fluent::class)) {
} elseif (is_a($item, \stdClass::class) || is_a($item, Fluent::class)) {
$name = $item->layout ?? null;
$key = $item->key ?? null;
$attributes = (array) ($item->attributes ?? []);
Expand Down

0 comments on commit 056db7f

Please sign in to comment.