Skip to content

Commit

Permalink
Add clarifying comment
Browse files Browse the repository at this point in the history
  • Loading branch information
djoksimo committed May 3, 2024
1 parent 4e6ba8f commit d8fbbe6
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ internal fun HttpUrl.Builder.addPathSegmentsSafe(path: String): HttpUrl.Builder
return this
}

/**
* [JSONObject.optString] has trouble falling back to `null` and seems to fallback to `"null"` (string) instead
*/
internal fun JSONObject.getStringOrNull(fieldName: String): String? {
return if (has(fieldName)) {
getString(fieldName)
Expand Down

0 comments on commit d8fbbe6

Please sign in to comment.