Skip to content

Commit

Permalink
fix: use kotlin compatible getType (#507)
Browse files Browse the repository at this point in the history
  • Loading branch information
WoLewicki authored Jun 28, 2024
1 parent a8726be commit 05ad6b4
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ class SafeAreaViewShadowNode : LayoutShadowNode() {
override fun setPaddings(index: Int, padding: Dynamic) {
val spacingType = ViewProps.PADDING_MARGIN_SPACING_TYPES[index]
mPaddings[spacingType] =
if (padding.type == ReadableType.Number) padding.asDouble().toFloat() else Float.NaN
if (padding.getType() == ReadableType.Number) padding.asDouble().toFloat() else Float.NaN
super.setPaddings(index, padding)
mNeedsUpdate = true
}
Expand All @@ -163,7 +163,7 @@ class SafeAreaViewShadowNode : LayoutShadowNode() {
override fun setMargins(index: Int, margin: Dynamic) {
val spacingType = ViewProps.PADDING_MARGIN_SPACING_TYPES[index]
mMargins[spacingType] =
if (margin.type == ReadableType.Number) margin.asDouble().toFloat() else Float.NaN
if (margin.getType() == ReadableType.Number) margin.asDouble().toFloat() else Float.NaN
super.setMargins(index, margin)
mNeedsUpdate = true
}
Expand Down

0 comments on commit 05ad6b4

Please sign in to comment.