From 12c54a3abc589ac7c6567d494fea73e08f6edbe6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Marsza=C5=82?= Date: Thu, 13 Jun 2024 16:22:49 +0200 Subject: [PATCH] fix: keep empty eleemt when no children defined as user_settings --- actions/class.Main.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/actions/class.Main.php b/actions/class.Main.php index 5a5e8c22f59..f17b3a72fb4 100644 --- a/actions/class.Main.php +++ b/actions/class.Main.php @@ -457,6 +457,16 @@ private function getNavigationElementsByGroup($groupId) } $entries[$i] = $entry; } + + //We want to always keep user settings menu dropdown even if there is no children to place logout button. + if (empty($children) && $perspective->getId() === 'user_settings') { + $entry = [ + 'perspective' => $perspective, + 'children' => [] + ]; + + $entries[$i] = $entry; + } } return $entries; }