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