From 802a371c9254aee87567eacb697c942e7c0f65d2 Mon Sep 17 00:00:00 2001 From: Valentin Shergin Date: Sat, 23 Jun 2018 19:10:08 -0700 Subject: [PATCH] Fabric: Fixed missed default value in parsing constructor of ViewProps Summary: @public It fixes a problem when some Views got disaper after they have non-zero opacity. Reviewed By: mdvacca Differential Revision: D8601600 fbshipit-source-id: 3da3ee591d4a685a8d7a56b15519d4d5cae4a031 --- ReactCommon/fabric/view/ViewProps.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ReactCommon/fabric/view/ViewProps.cpp b/ReactCommon/fabric/view/ViewProps.cpp index 73cc4702f0b..36d33216098 100644 --- a/ReactCommon/fabric/view/ViewProps.cpp +++ b/ReactCommon/fabric/view/ViewProps.cpp @@ -21,7 +21,7 @@ ViewProps::ViewProps(const YGStyle &yogaStyle): ViewProps::ViewProps(const ViewProps &sourceProps, const RawProps &rawProps): Props(sourceProps, rawProps), YogaStylableProps(sourceProps, rawProps), - opacity(convertRawProp(rawProps, "opacity", sourceProps.opacity)), + opacity(convertRawProp(rawProps, "opacity", sourceProps.opacity, (Float)1.0)), foregroundColor(convertRawProp(rawProps, "foregroundColor", sourceProps.foregroundColor)), backgroundColor(convertRawProp(rawProps, "backgroundColor", sourceProps.backgroundColor)), borderWidth(convertRawProp(rawProps, "borderWidth", sourceProps.borderWidth)),