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() {
|
@objc private func commitURL() {
|
||||||
textField.resignFirstResponder()
|
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 {
|
if components.scheme == nil {
|
||||||
components.scheme = "gemini"
|
components.scheme = "gemini"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue