Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Commit

Permalink
Fix exception when cancelling open dialogs
Browse files Browse the repository at this point in the history
  • Loading branch information
njx committed Apr 5, 2012
1 parent d0a6ab7 commit 9ab758b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/widgets/Dialogs.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,9 @@ define(function (require, exports, module) {
* be called with the special buttonId DIALOG_CANCELED (note: callback is run asynchronously).
*/
function cancelModalDialogIfOpen(dlgClass) {
$("." + dlgClass + ".instance").each(function (dlg) {
if (dlg.is(":visible")) { // Bootstrap breaks if try to hide dialog that's already hidden
_dismissDialog(dlg, DIALOG_CANCELED);
$("." + dlgClass + ".instance").each(function (index, dlg) {
if ($(dlg).is(":visible")) { // Bootstrap breaks if try to hide dialog that's already hidden
_dismissDialog($(dlg), DIALOG_CANCELED);
}
});
}
Expand Down

0 comments on commit 9ab758b

Please sign in to comment.