mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 20:33:32 +08:00
refactor(all): make all method return a promise
This commit is contained in:
@ -48,11 +48,10 @@ export class BackButton {
|
||||
|
||||
private async onClick(ev: Event) {
|
||||
const nav = this.el.closest('ion-nav');
|
||||
ev.preventDefault();
|
||||
|
||||
if (nav && nav.canGoBack()) {
|
||||
ev.preventDefault();
|
||||
if (!nav.isAnimating()) {
|
||||
nav.pop();
|
||||
}
|
||||
nav.pop({ skipIfBusy: true });
|
||||
} else if (this.defaultHref) {
|
||||
openURL(this.win, this.defaultHref, ev, 'back');
|
||||
}
|
||||
|
Reference in New Issue
Block a user