-
Notifications
You must be signed in to change notification settings - Fork 6.7k
fix(modal): should not throw an exception when a modal isn't on the stack #1972
Conversation
Looks like a good addition. |
@venuatu OK, this seems like a logic change, but I would like to know the case that you try to dismiss an already dismissed modal. |
When this is going to be released? This is a very ugly issue.
|
I had some code which was a crud list with a single modal up at a time and it broke on this issue when I upgraded from 0.6 (iirc) to the latest version var modal;
function closeModal() {
if (modal)
modal.close();
modal = undefined;
};
$scope.updateSomething = function (something) {
closeModal();
modal = $modal.open(...)
};
$scope.$on('$destroy', closeModal); |
@venuatu thnx for this PR. Could you please rebase on top of the current master and squash commits so there is only one commit in the pull request? |
$modalStack.openWindows.get(modalInstance) is undefined after the first dismiss and throws: - TypeError: Cannot read property 'value' of undefined
Merged, thnx @venuatu ! |
Uhhh, and this is not in the release 11.0 :/ |
thx~ |
This should be merged asap! |
hi, can this patch fix this error ? or is this error already fixed ?
|
No description provided.