Refactor unmanagedContainers property in Resources.php and add conditional return in loadUnmanagedContainers() method

This commit is contained in:
Andras Bacsai 2024-03-01 19:13:22 +01:00
parent 9fa71f847f
commit 4d8ffd05a9
2 changed files with 3 additions and 1 deletions

View File

@ -12,7 +12,7 @@ class Resources extends Component
use AuthorizesRequests;
public ?Server $server = null;
public $parameters = [];
public ?Collection $unmanagedContainers = null;
public Collection $unmanagedContainers;
public function getListeners()
{
$teamId = auth()->user()->currentTeam()->id;

View File

@ -275,6 +275,8 @@ public function loadUnmanagedContainers()
});
$containers = $containers->filter();
return collect($containers);
} else {
return collect([]);
}
}
public function hasDefinedResources()