fix(android): prevent error when detaching from unloaded ScrollView (#9666)

This commit is contained in:
Eduardo Speroni
2022-01-23 17:29:38 -03:00
committed by Nathan Walker
parent 608bb1ed24
commit e59f3ff669

View File

@@ -158,7 +158,7 @@ export class ScrollView extends ScrollViewBase {
}
protected dettachNative() {
this.nativeViewProtected.getViewTreeObserver().removeOnScrollChangedListener(this.handler);
this.nativeViewProtected?.getViewTreeObserver().removeOnScrollChangedListener(this.handler);
this.handler = null;
}
}