Fix unfriendly message on import OpenVPN

Fixes #977
This commit is contained in:
Davide 2024-12-04 09:11:02 +01:00
parent 0aaef04a25
commit d53a01864b
No known key found for this signature in database
GPG Key ID: A48836171C759F5E
1 changed files with 1 additions and 1 deletions

View File

@ -93,7 +93,7 @@ extension PassepartoutError: @retroactive LocalizedError {
return Strings.Errors.App.Passepartout.noActiveModules return Strings.Errors.App.Passepartout.noActiveModules
case .parsing: case .parsing:
let message = userInfo as? String ?? reason?.localizedDescription let message = userInfo as? String ?? (reason as? LocalizedError)?.localizedDescription
return [Strings.Errors.App.Passepartout.parsing, message] return [Strings.Errors.App.Passepartout.parsing, message]
.compactMap { $0 } .compactMap { $0 }