Skip to content

Commit

Permalink
bandaid to make description nullable
Browse files Browse the repository at this point in the history
  • Loading branch information
capyrightdev committed May 18, 2024
1 parent 598e649 commit 7160880
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/kotlin/dev/roava/user/User.kt
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class User {
displayName = userData.displayName!!
name = userData.name!!
id = userData.id!!
description = userData.description!!
description = userData.description ?: ""
}

/**
Expand Down Expand Up @@ -78,7 +78,7 @@ class User {
displayName = userData?.displayName!!
name = userData.name!!
id = userData.id!!
description = userData.description!!
description = userData.description ?: ""
} catch(exception: Exception) {
throw RuntimeException("The provided user ID is invalid!")
}
Expand Down Expand Up @@ -112,7 +112,7 @@ class User {
displayName = userData?.displayName!!
name = userData.name!!
id = userData.id!!
description = userData.description!!
description = userData.description ?:""
} catch(exception: Exception) {
throw RuntimeException("The provided username is invalid!")
}
Expand Down

0 comments on commit 7160880

Please sign in to comment.