Skip to content

Commit

Permalink
Fix existing layouts breaking
Browse files Browse the repository at this point in the history
whitecube#469 broke existing layouts. This PR rectifies that.
  • Loading branch information
mabdullahsari authored Jul 6, 2023
1 parent 72ca1ac commit efa5d5d
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 efa5d5d

Please sign in to comment.