Skip to content

Commit

Permalink
fix(alert): unhandled promise exception
Browse files Browse the repository at this point in the history
  • Loading branch information
manucorporat committed Jan 20, 2017
1 parent 8c4fd56 commit ee2268f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/alert/alert-component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,9 @@ export class AlertCmp {
}

if (shouldDismiss) {
this.dismiss(button.role);
this.dismiss(button.role).catch(() => {
console.debug('alert can not be dismissed');
});
}
}

Expand Down
1 change: 1 addition & 0 deletions src/components/tabs/test/advanced/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ export class TabsPage {
alert.dismiss().then(() => {
resolve();
});
return false;
}
}
]
Expand Down

0 comments on commit ee2268f

Please sign in to comment.