Fixed clowntoun related to `-[RCTShadowView canHaveSubviews]`
Summary: Shame on me. Naming can be hard. We have to use positive logic to avoid this kind of bugs. :( In the bright future we also have to rename `isYogaLeafNode` to something with positive logic, like `canHaveYogaChildNodes`. But before we can do this, we have to have solid plan how to unify it with Android. Reviewed By: mmmulani Differential Revision: D5780917 fbshipit-source-id: 1ddaaea06f5618b91528cc87f1433a55b5fae4ac
This commit is contained in:
parent
d2f3a7282b
commit
7b962397b6
|
@ -374,7 +374,7 @@ static void RCTProcessMetaPropsBorder(const YGValue metaProps[META_PROP_COUNT],
|
|||
|
||||
- (BOOL)canHaveSubviews
|
||||
{
|
||||
return NO;
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (BOOL)isYogaLeafNode
|
||||
|
@ -415,7 +415,7 @@ static void RCTProcessMetaPropsBorder(const YGValue metaProps[META_PROP_COUNT],
|
|||
|
||||
- (void)insertReactSubview:(RCTShadowView *)subview atIndex:(NSInteger)atIndex
|
||||
{
|
||||
RCTAssert(!self.canHaveSubviews, @"Attempt to insert subview inside leaf view.");
|
||||
RCTAssert(self.canHaveSubviews, @"Attempt to insert subview inside leaf view.");
|
||||
|
||||
[_reactSubviews insertObject:subview atIndex:atIndex];
|
||||
if (![self isYogaLeafNode]) {
|
||||
|
|
Loading…
Reference in New Issue