Skip to content

Commit bdd8fbe

Browse files
committed
Move isRTL inside the if
1 parent 8bd745a commit bdd8fbe

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager

‎packages/react-native/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTAttributedTextUtils.mm‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,8 @@ inline static CGFloat RCTEffectiveFontSizeMultiplierFromTextAttributes(const Tex
218218
// Paragraph Style
219219
NSMutableParagraphStyle *paragraphStyle = [NSMutableParagraphStyle new];
220220
BOOL isParagraphStyleUsed = NO;
221-
const bool isRTL = textAttributes.layoutDirection == LayoutDirection::RightToLeft;
222221
if (textAttributes.alignment.has_value() || textAttributes.layoutDirection.has_value()) {
222+
const bool isRTL = textAttributes.layoutDirection == LayoutDirection::RightToLeft;
223223
TextAlignment textAlignment =
224224
RCTResolveTextAlignment(textAttributes.alignment.value_or(TextAlignment::Natural), isRTL);
225225

0 commit comments

Comments
 (0)