diff --git a/ReactAndroid/src/main/java/com/facebook/yoga/YogaValue.java b/ReactAndroid/src/main/java/com/facebook/yoga/YogaValue.java index 1110eded20b..f9c0ebfc4e4 100644 --- a/ReactAndroid/src/main/java/com/facebook/yoga/YogaValue.java +++ b/ReactAndroid/src/main/java/com/facebook/yoga/YogaValue.java @@ -33,7 +33,9 @@ public class YogaValue { public boolean equals(Object other) { if (other instanceof YogaValue) { final YogaValue otherValue = (YogaValue) other; - return value == otherValue.value && unit == otherValue.unit; + if (unit == otherValue.unit) { + return unit == YogaUnit.UNDEFINED || Float.compare(value, otherValue.value) == 0; + } } return false; }