diff --git a/core/ui/src/main/kotlin/com/twitter/twittertext/Extractor.kt b/core/ui/src/main/kotlin/com/twitter/twittertext/Extractor.kt index ba5878c04..70db0e907 100644 --- a/core/ui/src/main/kotlin/com/twitter/twittertext/Extractor.kt +++ b/core/ui/src/main/kotlin/com/twitter/twittertext/Extractor.kt @@ -42,7 +42,7 @@ open class Extractor { // Two entities overlap only when one is URL and the other is hashtag/mention // which is a part of the URL. When it happens, we choose URL over hashtag/mention // by selecting the one with smaller start index. - if (!entities.isEmpty()) { + if (entities.isNotEmpty()) { val it = entities.iterator() var prev = it.next() while (it.hasNext()) {