mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Fix the accessibilityRole crash by updating values in the enum
Summary: Changelog: [Internal][Fixed] - Fix the accessibilityRole crash I only assigned three values that would be used for embedded links inside text (button, link, image). But the accessibilityRole has a lot of values that may be applied in other places. (https://reactnative.dev/docs/accessibility) To avoid this crash, need to add all possible values to the enum. Reviewed By: JoshuaGross, shergin Differential Revision: D22549264 fbshipit-source-id: dbaacf1965624e1d2eabe193b46168c6c8740f46
This commit is contained in:
committed by
Facebook GitHub Bot
parent
a7818dd754
commit
db365b86b2
@@ -94,7 +94,7 @@ void TextAttributes::apply(TextAttributes textAttributes) {
|
||||
layoutDirection = textAttributes.layoutDirection.hasValue()
|
||||
? textAttributes.layoutDirection
|
||||
: layoutDirection;
|
||||
accessibilityRole = !textAttributes.accessibilityRole.empty()
|
||||
accessibilityRole = textAttributes.accessibilityRole.hasValue()
|
||||
? textAttributes.accessibilityRole
|
||||
: accessibilityRole;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user