Skip to content

Commit 4c47809

Browse files
committed
fix: fontSize prop fallback on initial measure size calculation
1 parent 43b8287 commit 4c47809

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ object MeasurementStore {
137137
props: ReadableMap?,
138138
): Float {
139139
val propsFontSize = props?.getDouble("fontSize")?.toFloat()
140-
if (propsFontSize == null) return defaultView.textSize
140+
if (propsFontSize == null || propsFontSize <= 0) return defaultView.textSize
141141

142142
return ceil(pixelFromSpOrDp(propsFontSize, allowFontScalingFromProps(props)))
143143
}

0 commit comments

Comments
 (0)