diff --git a/commons/common-android/src/main/java/com/lighthouse/common/mapper/UriMapper.kt b/commons/common-android/src/main/java/com/lighthouse/common/mapper/UriMapper.kt index b0dd448f1..5f5354ff0 100644 --- a/commons/common-android/src/main/java/com/lighthouse/common/mapper/UriMapper.kt +++ b/commons/common-android/src/main/java/com/lighthouse/common/mapper/UriMapper.kt @@ -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) {