diff --git a/ReactCommon/fabric/components/text/basetext/BaseTextShadowNode.cpp b/ReactCommon/fabric/components/text/basetext/BaseTextShadowNode.cpp index 402ab2280..70904b419 100644 --- a/ReactCommon/fabric/components/text/basetext/BaseTextShadowNode.cpp +++ b/ReactCommon/fabric/components/text/basetext/BaseTextShadowNode.cpp @@ -18,11 +18,11 @@ namespace react { AttributedString BaseTextShadowNode::getAttributedString( const TextAttributes &textAttributes, - const SharedShadowNodeList &childNodes + const SharedShadowNode &parentNode ) const { AttributedString attributedString; - for (const auto &childNode : childNodes) { + for (const auto &childNode : parentNode->getChildren()) { // RawShadowNode auto rawTextShadowNode = std::dynamic_pointer_cast(childNode); if (rawTextShadowNode) { @@ -38,7 +38,7 @@ AttributedString BaseTextShadowNode::getAttributedString( if (textShadowNode) { TextAttributes localTextAttributes = textAttributes; localTextAttributes.apply(textShadowNode->getProps()->textAttributes); - attributedString.appendAttributedString(textShadowNode->getAttributedString(localTextAttributes, textShadowNode->getChildren())); + attributedString.appendAttributedString(textShadowNode->getAttributedString(localTextAttributes, textShadowNode)); continue; } diff --git a/ReactCommon/fabric/components/text/basetext/BaseTextShadowNode.h b/ReactCommon/fabric/components/text/basetext/BaseTextShadowNode.h index 3d1a8fd84..bb2493013 100644 --- a/ReactCommon/fabric/components/text/basetext/BaseTextShadowNode.h +++ b/ReactCommon/fabric/components/text/basetext/BaseTextShadowNode.h @@ -25,7 +25,7 @@ public: */ AttributedString getAttributedString( const TextAttributes &baseTextAttributes, - const SharedShadowNodeList &childNodes + const SharedShadowNode &parentNode ) const; }; diff --git a/ReactCommon/fabric/components/text/paragraph/ParagraphShadowNode.cpp b/ReactCommon/fabric/components/text/paragraph/ParagraphShadowNode.cpp index f249338d9..888d6c169 100644 --- a/ReactCommon/fabric/components/text/paragraph/ParagraphShadowNode.cpp +++ b/ReactCommon/fabric/components/text/paragraph/ParagraphShadowNode.cpp @@ -17,7 +17,7 @@ const char ParagraphComponentName[] = "Paragraph"; AttributedString ParagraphShadowNode::getAttributedString() const { if (!cachedAttributedString_.has_value()) { cachedAttributedString_ = - BaseTextShadowNode::getAttributedString(getProps()->textAttributes, getChildren()); + BaseTextShadowNode::getAttributedString(getProps()->textAttributes, shared_from_this()); } return cachedAttributedString_.value();