Address some OkHttp nullability issues

This commit is contained in:
Jobobby04
2022-09-03 19:55:30 -04:00
parent 0c1ac913cb
commit 6e1e42fefd
10 changed files with 14 additions and 15 deletions
+1 -2
View File
@@ -7,8 +7,7 @@ import okhttp3.ResponseBody.Companion.toResponseBody
import org.jsoup.nodes.Document
fun Response.interceptAsHtml(block: (Document) -> Unit): Response {
val body = body
return if (body?.contentType()?.type == "text" &&
return if (body.contentType()?.type == "text" &&
body.contentType()?.subtype == "html"
) {
val bodyString = body.string()