mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
fix(react): ensure element exists in controller before dismissing it
This commit is contained in:
@@ -49,7 +49,7 @@ export function createControllerComponent<T extends object, E extends OverlayCom
|
||||
|
||||
await this.element.present();
|
||||
}
|
||||
if (prevProps.isOpen !== this.props.isOpen && this.props.isOpen === false) {
|
||||
if (this.element && prevProps.isOpen !== this.props.isOpen && this.props.isOpen === false) {
|
||||
await this.element.dismiss();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user