Fixed a typo and added a test case

Summary: Fixed a typo of flexshrink and added a test case

Reviewed By: emilsjolander

Differential Revision: D7289221

fbshipit-source-id: 48ee9ccfac4adee51d515a366b5a11790f7236fc
This commit is contained in:
Pritesh Nandgaonkar
2018-03-15 12:29:00 -07:00
committed by Facebook Github Bot
parent 0dde40ce0b
commit ae86824636
2 changed files with 24 additions and 1 deletions

View File

@@ -778,7 +778,7 @@ void YGNodeStyleSetFlexShrink(const YGNodeRef node, const float flexShrink) {
if (!YGFloatOptionalFloatEquals(node->getStyle().flexShrink, flexShrink)) {
YGStyle style = node->getStyle();
if (YGFloatIsUndefined(flexShrink)) {
style.flexGrow = {true, 0};
style.flexShrink = {true, 0};
} else {
style.flexShrink = {false, flexShrink};
}