Fix crash when clearing URL field and pressing Go
This commit is contained in:
parent
e5f520cf6f
commit
dd0dcbde9c
|
@ -77,7 +77,9 @@ class NavigationBarView: UIView {
|
|||
|
||||
@objc private func commitURL() {
|
||||
textField.resignFirstResponder()
|
||||
if let text = textField.text, var components = URLComponents(string: text) {
|
||||
if let text = textField.text,
|
||||
!text.isEmpty,
|
||||
var components = URLComponents(string: text) {
|
||||
if components.scheme == nil {
|
||||
components.scheme = "gemini"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue