Skip to content

Commit 942c7d6

Browse files
author
Adam Gleitman
committed
descendantViewTags doesn't need to worry about duplicates
1 parent 3866165 commit 942c7d6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/react-native/Libraries/Text/Text/RCTTextShadowView.mm

+2-2
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ - (void)uiManagerWillPerformMounting
8484
exclusiveOwnership:YES];
8585

8686
NSNumber *tag = self.reactTag;
87-
NSMutableSet<NSNumber *> *descendantViewTags = [NSMutableSet new]; // [macOS] avoids duplicates
87+
NSMutableArray<NSNumber *> *descendantViewTags = [NSMutableArray new];
8888

8989
#if !TARGET_OS_OSX // [macOS]
9090
[textStorage enumerateAttribute:RCTBaseTextShadowViewEmbeddedShadowViewAttributeName
@@ -121,7 +121,7 @@ - (void)uiManagerWillPerformMounting
121121
}
122122

123123
NSMutableArray<RCTPlatformView *> *descendantViews = [NSMutableArray arrayWithCapacity:descendantViewTags.count]; // [macOS]
124-
[[descendantViewTags allObjects] // [macOS] because it's an NSMutableSet now
124+
[descendantViewTags
125125
enumerateObjectsUsingBlock:^(NSNumber *_Nonnull descendantViewTag, NSUInteger index, BOOL *_Nonnull stop) {
126126
RCTPlatformView *descendantView = viewRegistry[descendantViewTag]; // [macOS]
127127
if (!descendantView) {

0 commit comments

Comments
 (0)