macOS: Tunnel edit: actually clean up error handling
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
4e2f4e7124
commit
e2b068af1a
|
@ -218,11 +218,11 @@ class TunnelEditViewController: NSViewController {
|
||||||
tunnelsManager.add(tunnelConfiguration: tunnelConfiguration, activateOnDemandSetting: onDemandSetting) { [weak self] result in
|
tunnelsManager.add(tunnelConfiguration: tunnelConfiguration, activateOnDemandSetting: onDemandSetting) { [weak self] result in
|
||||||
if let error = result.error {
|
if let error = result.error {
|
||||||
ErrorPresenter.showErrorAlert(error: error, from: self)
|
ErrorPresenter.showErrorAlert(error: error, from: self)
|
||||||
} else {
|
return
|
||||||
let tunnel: TunnelContainer = result.value!
|
|
||||||
self?.dismiss(self)
|
|
||||||
self?.delegate?.tunnelSaved(tunnel: tunnel)
|
|
||||||
}
|
}
|
||||||
|
let tunnel: TunnelContainer = result.value!
|
||||||
|
self?.dismiss(self)
|
||||||
|
self?.delegate?.tunnelSaved(tunnel: tunnel)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue