Commit db5b82c7 authored by Davide De Rosa's avatar Davide De Rosa
Browse files

Fall back to default custom configuration

Configurations may be non-empty in database, yet corrupt or
incomplete. In that case, fall back to the custom configuration
found in defaults (if any).
parent 1dfc06e6
......@@ -132,7 +132,7 @@ extension Client {
var allConfigurations: [String: VPNCustomConfiguration] = [:]
for (vpnType, map) in allMaps {
let profile = configuration.profile(forVPNType: vpnType)
guard let configuration = profile?.parsedCustomConfiguration(from: map) else {
guard let configuration = profile?.parsedCustomConfiguration(from: map) ?? defaults.vpnCustomConfiguration(for: vpnType) else {
continue
}
allConfigurations[vpnType] = configuration
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment