diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/extensions/RealmExtensions.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/extensions/RealmExtensions.kt index 1e453d2d3e..c6ea2bc7bd 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/extensions/RealmExtensions.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/extensions/RealmExtensions.kt @@ -39,7 +39,7 @@ internal fun RealmList.clearWith(delete: (T) -> Unit) { lambda.invoke() } - if (!isEmpty()) { + if (isNotEmpty()) { fatalError("`clearWith` MUST delete all elements of the RealmList") } }