Fix reference error when ListItem is used with VisualItemModels

The correct way to check if an object is valid is using typeof(foo).
This commit is contained in:
Sebastian Kügler 2012-10-25 00:02:10 +02:00
parent d6afd5b91a
commit c9bfe00345

View File

@ -103,7 +103,7 @@ Item {
top: parent.top
}
height: naturalSize.height
visible: listItem.sectionDelegate || (index != undefined && index > 0 && !listItem.checked && !itemMouse.pressed)
visible: listItem.sectionDelegate || (typeof(index) != "undefined" && index > 0 && !listItem.checked && !itemMouse.pressed)
}
MouseArea {