Skip to content

Commit

Permalink
Merge pull request #3795 from ssigwart/pkgOpen
Browse files Browse the repository at this point in the history
Package install via Open link. Closes #3792
  • Loading branch information
th3coop authored Oct 28, 2019
2 parents 1c3d95e + c1b3399 commit 48536a2
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 48536a2

Please sign in to comment.