diff --git a/Libraries/Text/RCTShadowText.m b/Libraries/Text/RCTShadowText.m index b25c8c744..267cd2087 100644 --- a/Libraries/Text/RCTShadowText.m +++ b/Libraries/Text/RCTShadowText.m @@ -198,7 +198,7 @@ static YGSize RCTMeasure(YGNodeRef node, float width, YGMeasureMode widthMode, f { if ( _cachedTextStorage && - width == _cachedTextStorageWidth && + (width == _cachedTextStorageWidth || (isnan(width) && isnan(_cachedTextStorageWidth))) && widthMode == _cachedTextStorageWidthMode && _cachedEffectiveLayoutDirection == self.effectiveLayoutDirection ) {