Skip to content

Commit

Permalink
Merge pull request #817 from yous/fix-combobox
Browse files Browse the repository at this point in the history
Fix guard condition in NSComboBox handler
  • Loading branch information
youknowone committed May 1, 2022
2 parents 5a09b8a + 3f94cfd commit 58a445d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Preferences/PreferenceViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ final class PreferenceViewController: NSViewController {
}

@IBAction private func overridingKeyboardNameComboBoxValueChanged(_ sender: NSComboBox) {
guard sender.indexOfSelectedItem != NSNotFound else {
guard (0 ..< inputSources.count).contains(sender.indexOfSelectedItem) else {
return
}
configuration.overridingKeyboardName = inputSources[sender.indexOfSelectedItem].identifier
Expand Down

0 comments on commit 58a445d

Please sign in to comment.