Skip to content

Commit cb61dfd

Browse files
fix: lineHeight guard
1 parent 69b1d11 commit cb61dfd

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

android/src/main/java/com/swmansion/enriched/text/EnrichedTextView.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ class EnrichedTextView : AppCompatTextView {
310310
}
311311

312312
fun setLineHeight(height: Float) {
313-
lineHeight = if (height == 0f) null else height
313+
lineHeight = if (height <= 0f) null else height
314314
applyLineSpacing()
315315
}
316316

android/src/main/java/com/swmansion/enriched/textinput/EnrichedTextInputView.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,7 @@ class EnrichedTextInputView :
568568
}
569569

570570
fun setLineHeight(height: Float) {
571-
lineHeight = if (height == 0f) null else height
571+
lineHeight = if (height <= 0f) null else height
572572
applyLineSpacing()
573573
layoutManager.invalidateLayout()
574574
forceScrollToSelection()

0 commit comments

Comments
 (0)