Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(modal): pass reason when opened promise rejected
Browse files Browse the repository at this point in the history
onjiro authored and fernando-sendMail committed Jul 9, 2015
1 parent 606aca8 commit 08d8503
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/modal/modal.js
Original file line number Diff line number Diff line change
@@ -458,8 +458,8 @@ angular.module('ui.bootstrap.modal', [])

templateAndResolvePromise.then(function () {
modalOpenedDeferred.resolve(true);
}, function () {
modalOpenedDeferred.reject(false);
}, function (reason) {
modalOpenedDeferred.reject(reason);
});

return modalInstance;
2 changes: 1 addition & 1 deletion src/modal/test/modal.spec.js
Original file line number Diff line number Diff line change
@@ -231,7 +231,7 @@ describe('$modal', function () {
ok: function() {return $q.reject('ko');}
}}
);
expect(modal.opened).toBeRejectedWith(false);
expect(modal.opened).toBeRejectedWith('ko');
});

it('should focus on the element that has autofocus attribute when the modal is open/reopen', function () {

0 comments on commit 08d8503

Please sign in to comment.