Skip to content

Commit 7df49bc

Browse files
committed
Don't show empty element categories
1 parent 1f9f404 commit 7df49bc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

core/components/fred/src/Traits/Endpoint/Ajax/GetElements.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,9 @@ public function process()
8585
];
8686
}
8787

88-
$elements[] = $categoryElements;
88+
if (!empty($categoryElements['elements'])) {
89+
$elements[] = $categoryElements;
90+
}
8991
}
9092

9193
return $this->data(['elements' => $elements]);

0 commit comments

Comments
 (0)