From 76ed662f1e4246882faa8d994e0cbfa78f9f24d9 Mon Sep 17 00:00:00 2001 From: Nick Lefever Date: Tue, 13 May 2025 05:27:17 -0700 Subject: [PATCH] Fix numberOfLines prop diffing for Paragraph component (#51277) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/51277 The number of lines prop diffing was not being updated when enabling Props 2.0 and when set through the paragraph attributes. This diff fixes the typo that was causing the bug. Changelog: [Internal] Reviewed By: rshest Differential Revision: D74619497 fbshipit-source-id: 2ad7d1629106ff16d511760694dcef0cafd9a96e --- .../react/renderer/components/text/ParagraphProps.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native/ReactCommon/react/renderer/components/text/ParagraphProps.cpp b/packages/react-native/ReactCommon/react/renderer/components/text/ParagraphProps.cpp index 1e2473a766c..9fa1a594c62 100644 --- a/packages/react-native/ReactCommon/react/renderer/components/text/ParagraphProps.cpp +++ b/packages/react-native/ReactCommon/react/renderer/components/text/ParagraphProps.cpp @@ -167,7 +167,7 @@ folly::dynamic ParagraphProps::getDiffProps(const Props* prevProps) const { if (paragraphAttributes.maximumNumberOfLines != oldProps->paragraphAttributes.maximumNumberOfLines) { - result["numberOfLine"] = paragraphAttributes.maximumNumberOfLines; + result["numberOfLines"] = paragraphAttributes.maximumNumberOfLines; } if (paragraphAttributes.ellipsizeMode !=