Skip to content

Commit 03b0a03

Browse files
authored
fix(0.78, UBSAN): ensure [RCTUITextField validAttributesForMarkedText] is nonnull (#2522)
Backport of #2515 to 0.78-stable
1 parent 9de5b22 commit 03b0a03

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

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

162162
- (NSArray<NSAttributedStringKey> *)validAttributesForMarkedText
163163
{
164-
return ((NSTextView *)self.currentEditor).validAttributesForMarkedText;
164+
return ((NSTextView *)self.currentEditor).validAttributesForMarkedText ?: @[];
165165
}
166166

167167
#endif // macOS]

0 commit comments

Comments
 (0)