Skip to content

Commit 982235c

Browse files
committed
fix(UBSAN): ensure [RCTUITextField validAttributesForMarkedText] is nonnull
1 parent aae004c commit 982235c

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
@@ -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)