Skip to content

Commit d4ff5ed

Browse files
sammy-SCfacebook-github-bot
authored andcommitted
Don't return empty string for accessibilityLabel for RCTView
Summary: In case `RCTView` had no subviews, `RCTRecursiveAccessibilityLabel` was returning an empty string rather than nil. I've noticed that https://fburl.com/i95iynxi returns empty string as well. Shall we change it there as well? Reviewed By: shergin Differential Revision: D15337865 fbshipit-source-id: 8e38a88321f3dcfdf35a38d43fdbe4f5118796f1
1 parent 4a5d0bd commit d4ff5ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

React/Views/RCTView.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ - (UIView *)react_findClipView
9595
[str appendString:label];
9696
}
9797
}
98-
return str;
98+
return str.length == 0 ? nil : str;
9999
}
100100

101101
@implementation RCTView

0 commit comments

Comments
 (0)