aboutsummaryrefslogtreecommitdiffstats
path: root/WireGuard
diff options
context:
space:
mode:
Diffstat (limited to 'WireGuard')
-rw-r--r--WireGuard/WireGuard/UI/macOS/ViewController/TunnelEditViewController.swift8
1 files changed, 4 insertions, 4 deletions
diff --git a/WireGuard/WireGuard/UI/macOS/ViewController/TunnelEditViewController.swift b/WireGuard/WireGuard/UI/macOS/ViewController/TunnelEditViewController.swift
index 78c2bcc..7a6a4a0 100644
--- a/WireGuard/WireGuard/UI/macOS/ViewController/TunnelEditViewController.swift
+++ b/WireGuard/WireGuard/UI/macOS/ViewController/TunnelEditViewController.swift
@@ -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)
}
}
}