diff --git a/aztec/src/main/kotlin/org/wordpress/aztec/History.kt b/aztec/src/main/kotlin/org/wordpress/aztec/History.kt index dcbd4ac50..008b0aef9 100644 --- a/aztec/src/main/kotlin/org/wordpress/aztec/History.kt +++ b/aztec/src/main/kotlin/org/wordpress/aztec/History.kt @@ -61,7 +61,7 @@ class History(val historyEnabled: Boolean, val historySize: Int) { return } - while (historyCursor != historyList.size && historyCursor >= 0) { + while (historyCursor in 0 until historyList.size) { historyList.removeAt(historyCursor) }