mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-23 05:58:26 +08:00
fix(status-bar): ion-scroll might not exist
This commit is contained in:
@ -30,9 +30,11 @@ export class StatusTap {
|
||||
return;
|
||||
}
|
||||
const scroll = el.closest('ion-scroll') as HTMLIonScrollElement;
|
||||
if (scroll) {
|
||||
(scroll as any).componentOnReady().then(() => {
|
||||
this.dom.write(() => scroll.scrollToTop(this.duration));
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user