Fix entering uncategorized when there's only 1 thing

This commit is contained in:
Michael Zanetti 2020-09-28 19:50:49 +02:00
parent ef735c7cb9
commit 8e0aed8970

View File

@ -54,7 +54,11 @@ MainPageTile {
var page;
// Only one item? Go streight to the thing page
if (devicesProxy.count === 1) {
page = NymeaUtils.interfaceListToDevicePage([iface.name]);
if (!iface) {
page = "GenericDevicePage.qml";
} else {
page = NymeaUtils.interfaceListToDevicePage([iface.name]);
}
pageStack.push(Qt.resolvedUrl("../devicepages/" + page), {thing: devicesProxy.get(0)})
return;
}