mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Revert D17793693: [RN] Add debug message to RCTShadowView when we insert a subview incorrectly
Differential Revision: D17793693 Original commit changeset: 848ae658200e fbshipit-source-id: e59299f596f95e2bea978b07cd7e8f1de345708a
This commit is contained in:
committed by
Facebook Github Bot
parent
6611c4b8f4
commit
2a3fa968b4
@@ -227,15 +227,6 @@ static void RCTProcessMetaPropsBorder(const YGValue metaProps[META_PROP_COUNT],
|
||||
{
|
||||
RCTAssert(self.canHaveSubviews, @"Attempt to insert subview inside leaf view.");
|
||||
|
||||
// TODO(T55181688): Delete after getting crashes with a view hierarchy.
|
||||
if (atIndex > [_reactSubviews count]) {
|
||||
RCTShadowView *ancestor = self;
|
||||
for (NSInteger i = 0; i < 5 && [ancestor superview]; i++) {
|
||||
ancestor = [ancestor superview];
|
||||
}
|
||||
RCTAssert(NO, @"Tried to insert subview on view %@ with ancestor description %@", self, ancestor);
|
||||
}
|
||||
|
||||
[_reactSubviews insertObject:subview atIndex:atIndex];
|
||||
if (![self isYogaLeafNode]) {
|
||||
YGNodeInsertChild(_yogaNode, subview.yogaNode, (uint32_t)atIndex);
|
||||
|
||||
Reference in New Issue
Block a user