Skip to content

Commit

Permalink
Revert D17793693: [RN] Add debug message to RCTShadowView when we ins…
Browse files Browse the repository at this point in the history
…ert a subview incorrectly

Differential Revision:
D17793693

Original commit changeset: 848ae658200e

fbshipit-source-id: e59299f596f95e2bea978b07cd7e8f1de345708a
  • Loading branch information
Mehdi Mulani authored and facebook-github-bot committed Oct 9, 2019
1 parent 6611c4b commit 2a3fa96
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions React/Views/RCTShadowView.m
Original file line number Diff line number Diff line change
Expand Up @@ -227,15 +227,6 @@ - (void)insertReactSubview:(RCTShadowView *)subview atIndex:(NSInteger)atIndex
{
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);
Expand Down

0 comments on commit 2a3fa96

Please sign in to comment.