mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-02 09:21:44 +08:00
Small NaN related optimisation in RCTShadowText
Summary: NaN values can not be compared directly, so we have to use `isnan` function. Reviewed By: mmmulani Differential Revision: D5859761 fbshipit-source-id: bf99a1ae574cd820265bef0c2bd255b194c5dc3c
This commit is contained in:
committed by
Facebook Github Bot
parent
3649fce129
commit
73b596cfdd
@@ -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
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user