diff --git a/WordPressKit/WordPressOrgXMLRPCApi.swift b/WordPressKit/WordPressOrgXMLRPCApi.swift index 22f9ceaa..9a59d126 100644 --- a/WordPressKit/WordPressOrgXMLRPCApi.swift +++ b/WordPressKit/WordPressOrgXMLRPCApi.swift @@ -547,7 +547,7 @@ private extension WordPressAPIResult, WordPressOrgXMLRPCAp } } - if ["application/xml", "text/xml"].filter({ (type) -> Bool in return contentType.hasPrefix(type)}).count == 0 { + guard contentType.hasPrefix("application/xml") || contentType.hasPrefix("text/xml") else { return .failure(.unparsableResponse(response: response.response, body: response.body, underlyingError: WordPressOrgXMLRPCApiError.unknown)) }