Skip to content

Commit

Permalink
Add nil check for placeholder
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongwuzw committed Mar 4, 2019
1 parent ab704df commit bcb255a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Libraries/Text/TextInput/Multiline/RCTUITextView.m
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ - (NSString *)accessibilityLabel
- (void)setPlaceholder:(NSString *)placeholder
{
_placeholder = placeholder;
_placeholderView.attributedText = [[NSAttributedString alloc] initWithString:_placeholder attributes:[self placeholderEffectiveTextAttributes]];
_placeholderView.attributedText = [[NSAttributedString alloc] initWithString:_placeholder ?: @"" attributes:[self placeholderEffectiveTextAttributes]];
}

- (void)setPlaceholderColor:(UIColor *)placeholderColor
Expand Down

0 comments on commit bcb255a

Please sign in to comment.