mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
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
This commit is contained in:
committed by
Facebook Github Bot
parent
4a5d0bdbd7
commit
d4ff5ed258
@@ -95,7 +95,7 @@ static NSString *RCTRecursiveAccessibilityLabel(UIView *view)
|
||||
[str appendString:label];
|
||||
}
|
||||
}
|
||||
return str;
|
||||
return str.length == 0 ? nil : str;
|
||||
}
|
||||
|
||||
@implementation RCTView
|
||||
|
||||
Reference in New Issue
Block a user