diff --git a/packages/react-native/ReactCommon/react/renderer/attributedstring/ParagraphAttributes.cpp b/packages/react-native/ReactCommon/react/renderer/attributedstring/ParagraphAttributes.cpp index f2317ba080f202..c60fe918bebcf7 100644 --- a/packages/react-native/ReactCommon/react/renderer/attributedstring/ParagraphAttributes.cpp +++ b/packages/react-native/ReactCommon/react/renderer/attributedstring/ParagraphAttributes.cpp @@ -41,16 +41,38 @@ bool ParagraphAttributes::operator!=(const ParagraphAttributes& rhs) const { #if RN_DEBUG_STRING_CONVERTIBLE SharedDebugStringConvertibleList ParagraphAttributes::getDebugProps() const { + auto paragraphAttributes = ParagraphAttributes{}; return { - debugStringConvertibleItem("maximumNumberOfLines", maximumNumberOfLines), - debugStringConvertibleItem("ellipsizeMode", ellipsizeMode), - debugStringConvertibleItem("textBreakStrategy", textBreakStrategy), - debugStringConvertibleItem("adjustsFontSizeToFit", adjustsFontSizeToFit), - debugStringConvertibleItem("minimumFontSize", minimumFontSize), - debugStringConvertibleItem("maximumFontSize", maximumFontSize), - debugStringConvertibleItem("includeFontPadding", includeFontPadding), - debugStringConvertibleItem( - "android_hyphenationFrequency", android_hyphenationFrequency)}; + debugStringConvertibleItem( + "maximumNumberOfLines", + maximumNumberOfLines, + paragraphAttributes.maximumNumberOfLines), + debugStringConvertibleItem( + "ellipsizeMode", ellipsizeMode, paragraphAttributes.ellipsizeMode), + debugStringConvertibleItem( + "textBreakStrategy", + textBreakStrategy, + paragraphAttributes.textBreakStrategy), + debugStringConvertibleItem( + "adjustsFontSizeToFit", + adjustsFontSizeToFit, + paragraphAttributes.adjustsFontSizeToFit), + debugStringConvertibleItem( + "minimumFontSize", + minimumFontSize, + paragraphAttributes.minimumFontSize), + debugStringConvertibleItem( + "maximumFontSize", + maximumFontSize, + paragraphAttributes.maximumFontSize), + debugStringConvertibleItem( + "includeFontPadding", + includeFontPadding, + paragraphAttributes.includeFontPadding), + debugStringConvertibleItem( + "android_hyphenationFrequency", + android_hyphenationFrequency, + paragraphAttributes.android_hyphenationFrequency)}; } #endif