Skip to content

Commit

Permalink
Issues #287 chore: Uri과 String 이 각각 null 인 경우 대응
Browse files Browse the repository at this point in the history
  • Loading branch information
audxo112 committed Feb 8, 2023
1 parent 9499679 commit 9e1f843
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ fun Uri?.toDomain(): String {
return this?.toString() ?: ""
}

fun String.toUri(): Uri? {
return if (isNotEmpty()) {
fun String?.toUri(): Uri? {
return if (!isNullOrEmpty()) {
try {
Uri.parse(this)
} catch (e: Exception) {
Expand Down

0 comments on commit 9e1f843

Please sign in to comment.