diff --git a/ReCaptcha/Classes/ReCaptcha.swift b/ReCaptcha/Classes/ReCaptcha.swift index f005e86..08b8ad5 100644 --- a/ReCaptcha/Classes/ReCaptcha.swift +++ b/ReCaptcha/Classes/ReCaptcha.swift @@ -48,8 +48,8 @@ open class ReCaptcha: ReCaptchaWebViewManager { guard let apiKey = apiKey ?? (infoDict?[Constants.InfoDictKeys.APIKey] as? String) else { throw NSError(code: .apiKeyNotFound) } - - guard let domain = infoDict?[Constants.InfoDictKeys.Domain] as? String, let baseURL = baseURL ?? URL(string: domain) else { + + guard let baseURL = baseURL ?? URL(string: (infoDict?[Constants.InfoDictKeys.Domain] as? String) ?? "") else { throw NSError(code: .baseURLNotFound) }