Skip to content

Commit c223464

Browse files
committed
add owner check
1 parent 50155e5 commit c223464

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/bottom-navigation/index.ios.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,12 @@ class UITabBarControllerImpl extends UITabBarController {
5151
// @profile
5252
public viewDidDisappear(animated: boolean): void {
5353
super.viewDidDisappear(animated);
54-
const owner = this._owner.get();
55-
if (owner && !owner.parent && owner.isLoaded && !this.presentedViewController) {
56-
owner.callUnloaded();
54+
55+
if (this._owner) {
56+
const owner = this._owner.get();
57+
if (owner && !owner.parent && owner.isLoaded && !this.presentedViewController) {
58+
owner.callUnloaded();
59+
}
5760
}
5861
}
5962

0 commit comments

Comments
 (0)