mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-16 01:52:19 +08:00
This commit is contained in:
@ -40,7 +40,7 @@ export const createOverlayComponent = <OverlayComponent extends object, OverlayT
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
if (this.props.isOpen as boolean) {
|
||||
if (this.props.isOpen) {
|
||||
this.present();
|
||||
}
|
||||
}
|
||||
@ -92,7 +92,7 @@ export const createOverlayComponent = <OverlayComponent extends object, OverlayT
|
||||
|
||||
render() {
|
||||
return ReactDOM.createPortal(
|
||||
this.props.children,
|
||||
this.props.isOpen ? this.props.children : null,
|
||||
this.el
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user