diff --git a/packages/react-native/ReactCommon/react/renderer/components/text/ParagraphShadowNode.cpp b/packages/react-native/ReactCommon/react/renderer/components/text/ParagraphShadowNode.cpp index 0f78030f070..98fb4fce4de 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/text/ParagraphShadowNode.cpp +++ b/packages/react-native/ReactCommon/react/renderer/components/text/ParagraphShadowNode.cpp @@ -30,7 +30,7 @@ ParagraphShadowNode::ParagraphShadowNode( const ShadowNodeFragment& fragment) : ConcreteViewShadowNode(sourceShadowNode, fragment) { auto& sourceParagraphShadowNode = - dynamic_cast(sourceShadowNode); + static_cast(sourceShadowNode); if (!fragment.children && !fragment.props && sourceParagraphShadowNode.getIsLayoutClean()) { // This ParagraphShadowNode was cloned but did not change @@ -185,9 +185,7 @@ void ParagraphShadowNode::layout(LayoutContext layoutContext) { if (getConcreteProps().onTextLayout) { auto linesMeasurements = textLayoutManager_->measureLines( - content.attributedString, - content.paragraphAttributes, - measurement.size); + content.attributedString, content.paragraphAttributes, availableSize); getConcreteEventEmitter().onTextLayout(linesMeasurements); }