diff --git a/common/types/User.swift b/common/types/User.swift index 0b54622..f815549 100644 --- a/common/types/User.swift +++ b/common/types/User.swift @@ -28,7 +28,7 @@ struct User: Decodable, Identifiable, Hashable { // e-mails may be empty as they are not required during the registration process in Mete // however, Gravatar requires them for the profile picture functionality. // Default to the profile picture of md5("0"), which is simply the Gravatar logo on blue background - data: (try container.decode(String.self, forKey: .email).data(using: .utf8)) ?? "0".data(using: .utf8)! + data: (((try? container.decode(String.self, forKey: .email)) ?? "0").data(using: .utf8)!) ).compactMap { String(format: "%02x", $0) }.joined()