Skip to content

Commit 492bba3

Browse files
authored
fix(android): prevent error when detaching from unloaded ScrollView (#9666)
1 parent 7a4f06b commit 492bba3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎packages/core/ui/scroll-view/index.android.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ export class ScrollView extends ScrollViewBase {
158158
}
159159

160160
protected dettachNative() {
161-
this.nativeViewProtected.getViewTreeObserver().removeOnScrollChangedListener(this.handler);
161+
this.nativeViewProtected?.getViewTreeObserver().removeOnScrollChangedListener(this.handler);
162162
this.handler = null;
163163
}
164164
}

0 commit comments

Comments
 (0)