Skip to content

Commit 972877f

Browse files
committed
updated to remove extra text_layout null check
1 parent 77d3183 commit 972877f

1 file changed

Lines changed: 9 additions & 11 deletions

File tree

vnext/Microsoft.ReactNative/Fabric/Composition/ParagraphComponentView.cpp

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -281,17 +281,15 @@ void ParagraphComponentView::DrawText() noexcept {
281281
viewProps()->backgroundColor ? theme()->D2DColor(*viewProps()->backgroundColor)
282282
: D2D1::ColorF(D2D1::ColorF::Black, 0.0f));
283283
const auto &props = paragraphProps();
284-
if (m_textLayout) {
285-
RenderText(
286-
*d2dDeviceContext,
287-
*m_textLayout,
288-
m_attributedStringBox.getValue(),
289-
props.textAttributes,
290-
{static_cast<float>(offset.x) + m_layoutMetrics.contentInsets.left,
291-
static_cast<float>(offset.y) + m_layoutMetrics.contentInsets.top},
292-
m_layoutMetrics.pointScaleFactor,
293-
*theme());
294-
}
284+
RenderText(
285+
*d2dDeviceContext,
286+
*m_textLayout,
287+
m_attributedStringBox.getValue(),
288+
props.textAttributes,
289+
{static_cast<float>(offset.x) + m_layoutMetrics.contentInsets.left,
290+
static_cast<float>(offset.y) + m_layoutMetrics.contentInsets.top},
291+
m_layoutMetrics.pointScaleFactor,
292+
*theme());
295293

296294
if (!isnan(props.opacity)) {
297295
Visual().Opacity(props.opacity);

0 commit comments

Comments
 (0)