Docker: fixed javascript error when no containers exist

This commit is contained in:
bergware
2022-09-19 23:23:24 +02:00
parent 017488035a
commit 50b48df7b5
2 changed files with 2 additions and 1 deletions
@@ -57,6 +57,7 @@ table tbody td{line-height:normal}
<script src="<?autov('/webGui/javascript/jquery.switchbutton.js')?>"></script>
<script src="<?autov('/plugins/dynamix.docker.manager/javascript/docker.js')?>"></script>
<script>
var docker = [];
<?if (!$tabbed):?>
$('#title').append("<span id='busy' class='red-text strong' style='display:none;margin-left:40px'><?=$busy?></span>");
<?else:?>
@@ -41,7 +41,7 @@ if (file_exists($user_prefs)) {
// Read container info
$allInfo = $DockerTemplates->getAllInfo();
$docker = ['var docker=[];'];
$docker = [];
$null = '0.0.0.0';
$autostart = @file($autostart_file, FILE_IGNORE_NEW_LINES) ?: [];