Skip to content

Commit

Permalink
Fix a bug causing dialog cannot be closed if it is managed by maanger.
Browse files Browse the repository at this point in the history
  • Loading branch information
alan-wu committed Apr 2, 2019
1 parent 8423063 commit 7496e06
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/utilities/manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,14 +173,9 @@ exports.ModuleManager = function() {

this.removeDialog = function(dialogIn) {
if (dialogIn) {
var managerItems = findManagerItemWithDialog(dialogIn)

for (var i = 0; i < managerItems.length; i++) {
var dialog = managerItems[i].getDialog();
if (dialog === dialogIn) {
managerItems[i].setDialog(undefined);
return;
}
var item = findManagerItemWithDialog(dialogIn);
if (item) {
item.setDialog(undefined);
}
}
}
Expand Down

0 comments on commit 7496e06

Please sign in to comment.