Skip to content

Commit

Permalink
Package install via Open link. Closes #3792
Browse files Browse the repository at this point in the history
  • Loading branch information
ssigwart committed Oct 26, 2019
1 parent 1c3d95e commit c1b3399
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/modules/scope_packages/content/packages.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,13 @@
this.onSelectResult = function()
{
var result = commando.getSelectedResult();
require("./manage").installPackage(result.data.package, function()
var pkg = null;
if (result.data && result.data.package)
pkg = result.data.package;
// Handle "Open" option when viewing a package
else if (result.subscope && result.subscope.data && result.subscope.data.package)
pkg = result.subscope.data.package;
require("./manage").installPackage(pkg, function()
{
commando.refresh();
commando.hide.bind(commando);
Expand Down Expand Up @@ -587,7 +593,7 @@
this.isSystemAddon = function(id)
{
var addon = _cache.addons[id] || null;
if (addon && addon.scope == AddonManager.SCOPE_APPLICATION || addon.scope == AddonManager.SCOPE_SYSTEM)
if (addon && (addon.scope == AddonManager.SCOPE_APPLICATION || addon.scope == AddonManager.SCOPE_SYSTEM))
return true;
return false;
}
Expand Down

0 comments on commit c1b3399

Please sign in to comment.