Skip to content

Commit

Permalink
Merge branch 'master' of github.com:mkaply/cck2wizard
Browse files Browse the repository at this point in the history
  • Loading branch information
mkaply committed Jul 27, 2018
2 parents 911d967 + 0c9b675 commit 00794ae
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions cck2/modules/CCK2.jsm
Original file line number Diff line number Diff line change
Expand Up @@ -932,8 +932,7 @@ var CCK2 = {
var numAddonsInstalled = 0;
var numAddons = config.addons.length;
for (var i=0; i < config.addons.length; i++) {
try {
AddonManager.getInstallForURL(config.addons[i], function(addonInstall) {
AddonManager.getInstallForURL(config.addons[i], "application/x-xpinstall").then(addonInstall => {
let listener = {
onInstallEnded: function(install, addon) {
if (addon.isActive) {
Expand All @@ -947,13 +946,10 @@ var CCK2 = {
Services.startup.quit(Services.startup.eRestart | Services.startup.eAttemptQuit);
}
}
}
};
addonInstall.addListener(listener);
addonInstall.install();
}, "application/x-xpinstall");
} catch (e) {
errorCritical(e);
}
});
}
}
}
Expand Down

0 comments on commit 00794ae

Please sign in to comment.