angular-ui/bootstrap — pull request #2114 by zeropaper (2014-04-28 12:23:19+00:00)
Title: fix(modal): prevent error when closing non-opened

$modalStack.close() and $modalStack.dismiss() were assuming that openedWindows.get(modalInstance) always returned something and this might have led to thrown errors when trying to close a modal window who was actually not open.