Skip to content

Commit 2fbcda2

Browse files
authored
fix(0.77, UBSAN): ensure [RCTUITextField validAttributesForMarkedText] is nonnull (#2521)
Backport of #2515 to 0.77-stable
1 parent 4ff561e commit 2fbcda2

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
react-native-macos: patch
3+
---
4+
5+
new patch release

packages/react-native/Libraries/Text/TextInput/Singleline/RCTUITextField.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ - (BOOL)hasMarkedText
153153

154154
- (NSArray<NSAttributedStringKey> *)validAttributesForMarkedText
155155
{
156-
return ((NSTextView *)self.currentEditor).validAttributesForMarkedText;
156+
return ((NSTextView *)self.currentEditor).validAttributesForMarkedText ?: @[];
157157
}
158158

159159
#endif // macOS]

0 commit comments

Comments
 (0)