Skip to content

Commit

Permalink
Fixed the empty library response.
Browse files Browse the repository at this point in the history
  • Loading branch information
ruslanbaidan committed Sep 6, 2024
1 parent 434ea49 commit c28ee00
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Service/ObjectService.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,10 @@ public function getLibraryTreeStructure(Entity\Anr $anr): array
{
$result = [];
foreach ($anr->getObjectCategories() as $objectCategory) {
$result[] = $this->getCategoriesAndObjectsTreeList($objectCategory, $anr);
$objectsCategoriesData = $this->getCategoriesAndObjectsTreeList($objectCategory, $anr);
if (!empty($objectsCategoriesData)) {
$result[] = $objectsCategoriesData;
}
}

/* Places uncategorized objects. */
Expand Down

0 comments on commit c28ee00

Please sign in to comment.