diff --git a/packages/react-native/ReactCommon/react/renderer/attributedstring/TextAttributes.cpp b/packages/react-native/ReactCommon/react/renderer/attributedstring/TextAttributes.cpp index 2982e5923693b1..9cf89bfa506726 100644 --- a/packages/react-native/ReactCommon/react/renderer/attributedstring/TextAttributes.cpp +++ b/packages/react-native/ReactCommon/react/renderer/attributedstring/TextAttributes.cpp @@ -176,13 +176,13 @@ bool TextAttributes::operator==(const TextAttributes& rhs) const { TextAttributes TextAttributes::defaultTextAttributes() { static auto textAttributes = [] { - auto textAttributes = TextAttributes{}; + auto defaultAttrs = TextAttributes{}; // Non-obvious (can be different among platforms) default text attributes. - textAttributes.foregroundColor = blackColor(); - textAttributes.backgroundColor = clearColor(); - textAttributes.fontSize = 14.0; - textAttributes.fontSizeMultiplier = 1.0; - return textAttributes; + defaultAttrs.foregroundColor = blackColor(); + defaultAttrs.backgroundColor = clearColor(); + defaultAttrs.fontSize = 14.0; + defaultAttrs.fontSizeMultiplier = 1.0; + return defaultAttrs; }(); return textAttributes; }