fix(android): accessibility crash on View not extending android.view.View (#9303)

This commit is contained in:
Martin Guillon
2021-04-07 01:39:52 +02:00
committed by GitHub
parent 83fc446f62
commit fde666de28

View File

@ -545,7 +545,7 @@ function setAccessibilityDelegate(view: Partial<View>): void {
ensureNativeClasses();
const androidView = view.nativeViewProtected as android.view.View;
if (!androidView) {
if (!androidView || !androidView.setAccessibilityDelegate) {
return;
}