mirror of
https://github.com/status-im/react-native.git
synced 2025-02-25 07:35:25 +00:00
Fix assertion preventing YGNodeLayoutGet* with YGEdgeEnd
Summary: Expected to be able to call `YGNodeLayoutGetMargin(node, YGEdgeEnd)`, but instead, the program aborts with `"Cannot get layout properties of multi-edge shorthands"`. This bug seems to incorrectly prevent properties from YGEdgeEnd for all Layout properties. Closes https://github.com/facebook/yoga/pull/632 Differential Revision: D6408060 Pulled By: emilsjolander fbshipit-source-id: 4ab3b2ffb2f1bb6fd3a27f780caf0123abcdb230
This commit is contained in:
parent
d5b59517c2
commit
a383b8ca05
@ -659,8 +659,9 @@ static inline const YGValue *YGNodeResolveFlexBasisPtr(const YGNodeRef node) {
|
||||
|
||||
#define YG_NODE_LAYOUT_RESOLVED_PROPERTY_IMPL(type, name, instanceName) \
|
||||
type YGNodeLayoutGet##name(const YGNodeRef node, const YGEdge edge) { \
|
||||
YGAssertWithNode(node, \
|
||||
edge < YGEdgeEnd, \
|
||||
YGAssertWithNode( \
|
||||
node, \
|
||||
edge <= YGEdgeEnd, \
|
||||
"Cannot get layout properties of multi-edge shorthands"); \
|
||||
\
|
||||
if (edge == YGEdgeLeft) { \
|
||||
|
Loading…
x
Reference in New Issue
Block a user