diff --git a/Source/ASDisplayNode+Layout.mm b/Source/ASDisplayNode+Layout.mm index 8800aa6fc..42f0f0d6d 100644 --- a/Source/ASDisplayNode+Layout.mm +++ b/Source/ASDisplayNode+Layout.mm @@ -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; }