BranchesDashboard: do not fail with no dashlet

This commit is contained in:
Thomas Gelf 2021-08-25 16:24:54 +02:00
parent b898041caa
commit 6cc902f238
1 changed files with 2 additions and 0 deletions

View File

@ -29,6 +29,8 @@ class BranchesDashboard extends Dashboard
/** @var BranchSupportHook $hook */ /** @var BranchSupportHook $hook */
if ($hook = Hook::first('director/BranchSupport')) { if ($hook = Hook::first('director/BranchSupport')) {
$this->dashlets = $hook->loadDashlets($this->getDb()); $this->dashlets = $hook->loadDashlets($this->getDb());
} else {
$this->dashlets = [];
} }
} }
} }