mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
fix(android): prevent error when detaching from unloaded ScrollView (#9666)
This commit is contained in:
committed by
Nathan Walker
parent
608bb1ed24
commit
e59f3ff669
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user