diff --git a/node_modules/react-native/Libraries/Text/Text/RCTTextShadowView.m b/node_modules/react-native/Libraries/Text/Text/RCTTextShadowView.m index d464e6a..6c397c5 100644 --- a/node_modules/react-native/Libraries/Text/Text/RCTTextShadowView.m +++ b/node_modules/react-native/Libraries/Text/Text/RCTTextShadowView.m @@ -170,6 +170,12 @@ - (void)postprocessAttributedText:(NSMutableAttributedString *)attributedText - (NSAttributedString *)attributedTextWithMeasuredAttachmentsThatFitSize:(CGSize)size { + static UIImage *placeholderImage; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + placeholderImage = [UIImage new]; + }); + NSMutableAttributedString *attributedText = [[NSMutableAttributedString alloc] initWithAttributedString:[self attributedTextWithBaseTextAttributes:nil]]; @@ -188,6 +194,7 @@ - (NSAttributedString *)attributedTextWithMeasuredAttachmentsThatFitSize:(CGSize maximumSize:size]; NSTextAttachment *attachment = [NSTextAttachment new]; attachment.bounds = (CGRect){CGPointZero, fittingSize}; + attachment.image = placeholderImage; [attributedText addAttribute:NSAttachmentAttributeName value:attachment range:range]; } ];