macOS: Tunnel edit: actually clean up error handling

This commit is contained in:
Jason A. Donenfeld 2019-01-21 23:21:47 +01:00
parent b69dbfda52
commit c0883e37c4
1 changed files with 4 additions and 4 deletions

View File

@ -218,11 +218,11 @@ class TunnelEditViewController: NSViewController {
tunnelsManager.add(tunnelConfiguration: tunnelConfiguration, activateOnDemandSetting: onDemandSetting) { [weak self] result in
if let error = result.error {
ErrorPresenter.showErrorAlert(error: error, from: self)
} else {
let tunnel: TunnelContainer = result.value!
self?.dismiss(self)
self?.delegate?.tunnelSaved(tunnel: tunnel)
return
}
let tunnel: TunnelContainer = result.value!
self?.dismiss(self)
self?.delegate?.tunnelSaved(tunnel: tunnel)
}
}
}