Permalink
Browse files

Assertion on attempt to get layout metrics from dirtied Yoga node

Reviewed By: javache

Differential Revision: D4865294

fbshipit-source-id: e1bd2f297af87ffa817003f9e4dae94ad2c96644
  • Loading branch information...
shergin authored and facebook-github-bot committed May 1, 2017
1 parent cf5c549 commit 18fd18e79215bbd593962935fa5dd5adcf42dbb0
Showing with 2 additions and 0 deletions.
  1. +2 −0 React/Views/RCTShadowView.m
@@ -167,6 +167,8 @@ - (void)applyLayoutNode:(YGNodeRef)node
}
YGNodeSetHasNewLayout(node, false);
RCTAssert(!YGNodeIsDirty(node), @"Attempt to get layout metrics from dirtied Yoga node.");
#if RCT_DEBUG
// This works around a breaking change in Yoga layout where setting flexBasis needs to be set explicitly, instead of relying on flex to propagate.
// We check for it by seeing if a width/height is provided along with a flexBasis of 0 and the width/height is laid out as 0.

2 comments on commit 18fd18e

@maluramichael

This comment has been minimized.

Show comment
Hide comment
@maluramichael

maluramichael Aug 8, 2017

What does this mean? Now i cannot navigate anymore.

What does this mean? Now i cannot navigate anymore.

@shergin

This comment has been minimized.

Show comment
Hide comment
@shergin

shergin Aug 11, 2017

Contributor

@maluramichael You cannot navigate? What do you mean?

Contributor

shergin replied Aug 11, 2017

@maluramichael You cannot navigate? What do you mean?

Please sign in to comment.