Skip to content

Commit 1592a8d

Browse files
committed
Update bad method
1 parent 300ba7a commit 1592a8d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ReactAndroid/src/main/java/com/facebook/react/uimanager/AccessibilityDelegateUtil.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,11 @@ public static String getValue(AccessibilityRole role) {
7676

7777
public static AccessibilityRole fromValue(@Nullable String value) {
7878
for (AccessibilityRole role : AccessibilityRole.values()) {
79-
if (role.getValue() != null && role.getValue().equals(value)) {
79+
if (role.name().equalsIgnoreCase(value)) {
8080
return role;
8181
}
8282
}
83-
return AccessibilityRole.NONE;
83+
throw new IllegalArgumentException("Invalid accessibility role value: " + value);
8484
}
8585
}
8686

0 commit comments

Comments
 (0)