mirror of
https://github.com/unraid/webgui.git
synced 2026-05-07 04:41:03 -05:00
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:
@@ -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>'
|
||||
: '';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user