Fixed Bug in View when no or a single voice call is active

This commit is contained in:
Luca Haid
2024-05-08 21:19:23 +02:00
parent 1f30671cf9
commit 1f477a4b2f
3 changed files with 5 additions and 3 deletions

View File

@@ -54,8 +54,10 @@ class VoiceCallActiveController extends mfBaseController {
}
private function getActiveCalls(): array {
$activeCalls = $this->kolmisoftMore->getActiveCalls();
return [
"rows" => array_reverse($this->kolmisoftMore->getActiveCalls())
"rows" => is_null($activeCalls) ? [] : (is_object($activeCalls) ? [$activeCalls] : $activeCalls),
];
}
}