Deal more gracefully with absent choices
This commit is contained in:
parent
b7628c8c65
commit
ccba71cc2e
|
@ -111,7 +111,7 @@ class ASHardware {
|
|||
if choices.count <= 10 {
|
||||
menu.addSortedChoices([ASPropertyEntry](choices.values), target: target, selector: selector)
|
||||
} else {
|
||||
menu.addSortedChoices(recentChoices.map({ (recent: String) in choices[recent]! }), target: target, selector: selector)
|
||||
menu.addSortedChoices(recentChoices.flatMap({ (recent: String) in choices[recent] }), target: target, selector: selector)
|
||||
menu.addItem(NSMenuItem.separatorItem())
|
||||
var seen = [String: Bool]()
|
||||
for prop in choices.values {
|
||||
|
|
Loading…
Reference in New Issue
Block a user