Check if options are available before matching on them

This prevents a QML warning when the ListModel is created before the property provider is. This QML warning looked like this:
2020-03-20 15:04:30,012 - WARNING - [MainThread] UM.Qt.QtApplication.__onQmlWarning [406]: file:///home/trin/Gedeeld/Projects/Cura/cura/../resources/qml/MachineSettings/ComboBoxWithOptions.qml:74: TypeError: Cannot call method 'match' of undefined

Done during Turbo Testing and Tooling.
This commit is contained in:
Ghostkeeper 2020-03-20 15:09:46 +01:00
parent 5cfe71e516
commit 31aee866f4
No known key found for this signature in database
GPG key ID: D2A8871EE34EC59A
2 changed files with 11 additions and 8 deletions

View file

@ -1,4 +1,4 @@
// Copyright (c) 2019 Ultimaker B.V.
// Copyright (c) 2020 Ultimaker B.V.
// Cura is released under the terms of the LGPLv3 or higher.
import QtQuick 2.10