Skip to content

Commit

Permalink
Only set ASLayoutElementStyle delegate if Yoga is enabled (#1417)
Browse files Browse the repository at this point in the history
  • Loading branch information
maicki committed Mar 21, 2019
1 parent f4d6b95 commit 74de765
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Source/ASDisplayNode+Layout.mm
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,12 @@ - (ASLayoutElementStyle *)_locked_style
{
ASAssertLocked(__instanceLock__);
if (_style == nil) {
#if YOGA
// In Yoga mode we use the delegate to inform the tree if properties changes
_style = [[ASLayoutElementStyle alloc] initWithDelegate:self];
#else
_style = [[ASLayoutElementStyle alloc] init];
#endif
}
return _style;
}
Expand Down

0 comments on commit 74de765

Please sign in to comment.