Skip to content

Commit

Permalink
Fixed code smell
Browse files Browse the repository at this point in the history
  • Loading branch information
ethauvin committed Jun 29, 2023
1 parent 45e2915 commit 3f96639
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .idea/kotlinc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/main/kotlin/net/thauvin/erik/bitly/Bitlinks.kt
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ open class Bitlinks(private val accessToken: String) {

private fun JSONObject.getString(key: String, default: String): String {
return if (this.has(key))
this.get(key).toString()
this[key].toString()
else
default
}
Expand Down

0 comments on commit 3f96639

Please sign in to comment.