fix: handle empty output in generatePanels function

- Updated the generatePanels function to return an empty string if no panels are generated, ensuring cleaner output when there are no panels to display.
This commit is contained in:
Zack Spear
2025-05-27 16:20:24 -07:00
parent b47740b465
commit 9e7c27bc6a
@@ -107,7 +107,9 @@ function generatePanels($page, $path, $defaultIcon, $docroot, $useTabCookie = fa
foreach ($pgs as $pg) {
$output .= generatePanel($pg, $path, $defaultIcon, $docroot, $useTabCookie);
}
return '<div class="Panels">'.$output.'</div>';
return !empty($output)
? '<div class="Panels">'.$output.'</div>'
: '';
}
/**