From d53a01864b734952a49254a91e7ddbf328a22a2f Mon Sep 17 00:00:00 2001 From: Davide Date: Wed, 4 Dec 2024 09:11:02 +0100 Subject: [PATCH] Fix unfriendly message on import OpenVPN Fixes #977 --- Library/Sources/UILibrary/L10n/AppError+L10n.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Sources/UILibrary/L10n/AppError+L10n.swift b/Library/Sources/UILibrary/L10n/AppError+L10n.swift index f5b91696..f20a6b21 100644 --- a/Library/Sources/UILibrary/L10n/AppError+L10n.swift +++ b/Library/Sources/UILibrary/L10n/AppError+L10n.swift @@ -93,7 +93,7 @@ extension PassepartoutError: @retroactive LocalizedError { return Strings.Errors.App.Passepartout.noActiveModules 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] .compactMap { $0 }