Skip to content

Commit

Permalink
allow saving of field layout with no tabs but with card view config
Browse files Browse the repository at this point in the history
  • Loading branch information
i-just committed Jan 30, 2025
1 parent 951b907 commit cc5fae1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/models/FieldLayout.php
Original file line number Diff line number Diff line change
Expand Up @@ -586,12 +586,12 @@ public function getConfig(): ?array
$this->getTabs(),
));

if (empty($tabConfigs)) {
$cardViewConfig = $this->getCardView();

if (empty($tabConfigs) && empty($cardViewConfig)) {
return null;
}

$cardViewConfig = $this->getCardView();

return [
'tabs' => $tabConfigs,
'cardView' => $cardViewConfig,
Expand Down

0 comments on commit cc5fae1

Please sign in to comment.