on xenial help sign in
Check if the appId string is not empty before using it
6c68e0cDaniel d'Andrada
qml/Stages/TabletStage.qml+7−5
@@ -82,11 +82,13 @@ Rectangle {
82 }
82 }
83
83
84 function updateSpreadDelegateFocus() {
84 function updateSpreadDelegateFocus() {
85+ if (priv.focusedAppId) {
85− var focusedAppIndex = priv.indexOf(priv.focusedAppId);
86+ var focusedAppIndex = priv.indexOf(priv.focusedAppId);
86− if (focusedAppIndex !== -1) {
87+ if (focusedAppIndex !== -1) {
87− spreadRepeater.itemAt(focusedAppIndex).focus = true;
88+ spreadRepeater.itemAt(focusedAppIndex).focus = true;
88− } else {
89+ } else {
89− console.warn("TabletStage: Failed to find the SpreadDelegate for appID=" + priv.focusedAppId);
90+ console.warn("TabletStage: Failed to find the SpreadDelegate for appID=" + priv.focusedAppId);
91+ }
90 }
92 }
91 }
93 }
92
94