summaryrefslogtreecommitdiff
path: root/modules/controlcenter/Session.qml
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2026-01-16 01:55:20 +1100
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2026-01-16 01:59:20 +1100
commit33c1c694de3c214306f72c16f7581cd93886dc6b (patch)
treec7e72db99b3b3f0682343131c8bbf0c6268ee655 /modules/controlcenter/Session.qml
parentinternal: no async loaders (diff)
downloadcaelestia-shell-33c1c694de3c214306f72c16f7581cd93886dc6b.tar.gz
caelestia-shell-33c1c694de3c214306f72c16f7581cd93886dc6b.tar.bz2
caelestia-shell-33c1c694de3c214306f72c16f7581cd93886dc6b.zip
internal: fix errors due to sync loaders
Diffstat (limited to 'modules/controlcenter/Session.qml')
-rw-r--r--modules/controlcenter/Session.qml4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/controlcenter/Session.qml b/modules/controlcenter/Session.qml
index 0408a1a..5c4bb05 100644
--- a/modules/controlcenter/Session.qml
+++ b/modules/controlcenter/Session.qml
@@ -16,6 +16,6 @@ QtObject {
readonly property EthernetState ethernet: EthernetState {}
readonly property LauncherState launcher: LauncherState {}
- onActiveChanged: activeIndex = panes.indexOf(active)
- onActiveIndexChanged: active = panes[activeIndex]
+ onActiveChanged: activeIndex = Math.max(0, panes.indexOf(active))
+ onActiveIndexChanged: if (panes[activeIndex]) active = panes[activeIndex]
}