fix(modal): backdrop click catches navigation promise

A modal with canLeave = false, can lead to an unhandled exception when closing through a click in the backdrop
This commit is contained in:
Manu Mtz.-Almeida
2016-11-19 18:15:26 +01:00
parent 053c7546d4
commit e46d8d6938

View File

@ -75,7 +75,9 @@ export class ModalCmp {
_bdClick() { _bdClick() {
if (this._enabled && this._bdDismiss) { if (this._enabled && this._bdDismiss) {
return this._viewCtrl.dismiss(null, 'backdrop'); return this._viewCtrl.dismiss(null, 'backdrop').catch(() => {
console.debug('Dismiss modal by clicking backdrop was cancelled');
});
} }
} }