fix(core): guard unstable page/frame init contexts under async conditions (#9428)

This commit is contained in:
Nathan Walker
2021-05-30 12:02:38 -07:00
committed by GitHub
parent 04381fa3e7
commit d3bc4d5b82
3 changed files with 13 additions and 7 deletions

View File

@ -224,7 +224,7 @@ export class Frame extends FrameBase {
this._ios._disableNavBarAnimation = disableNavBarAnimationCache;
}
if (this._ios.controller.navigationBar) {
if (this._ios.controller?.navigationBar) {
this._ios.controller.navigationBar.userInteractionEnabled = this.navigationQueueIsEmpty();
}
@ -666,7 +666,9 @@ class iOSFrame implements iOSFrameDefinition {
}
public set showNavigationBar(value: boolean) {
this._showNavigationBar = value;
this._controller.setNavigationBarHiddenAnimated(!value, !this._disableNavBarAnimation);
if (this._controller) {
this._controller.setNavigationBarHiddenAnimated(!value, !this._disableNavBarAnimation);
}
}
public get navBarVisibility(): 'auto' | 'never' | 'always' {