Verified Commit b8afd598 authored by Jonah Brüchert's avatar Jonah Brüchert 🌳

Tabs: Fix type error

`TypeError: Cannot read property 'icon' of null`
parent 3c7414e6
......@@ -210,14 +210,14 @@ Kirigami.ScrollablePage {
Kirigami.Heading {
elide: Text.ElideRight
level: 4
text: tabs.itemAt(index) != null ? tabs.itemAt(index).title : ""
text: tabs.itemAt(index) ? tabs.itemAt(index).title : ""
width: label.width
}
Controls.Label {
elide: Text.ElideRight
font.pointSize: Kirigami.Theme.defaultFont.pointSize * 0.5
text: tabs.itemAt(index) != null ? tabs.itemAt(index).url : ""
text: tabs.itemAt(index) ? tabs.itemAt(index).url : ""
width: label.width
}
}
......@@ -231,7 +231,7 @@ Kirigami.ScrollablePage {
}
fillMode: Image.PreserveAspectFit
height: Math.min(sourceSize.height, label.height)
source: tabs.itemAt(index).icon
source: tabs.itemAt(index) ? tabs.itemAt(index).icon : ""
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment