Skip to content

Commit

Permalink
Fix empty results when searching with lowercase characters.
Browse files Browse the repository at this point in the history
  • Loading branch information
kizitonwose committed Feb 27, 2019
1 parent a331871 commit a961305
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CountryPickerView/CountryPickerViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ extension CountryPickerViewController: UISearchResultsUpdating {
if showOnlyPreferredSection && hasPreferredSection,
let array = countries[dataSource.preferredCountriesSectionTitle!] {
indexArray = array
} else if let array = countries[String(text[text.startIndex])] {
} else if let array = countries[String(text.capitalized[text.startIndex])] {
indexArray = array
}

Expand Down

0 comments on commit a961305

Please sign in to comment.