Skip to content

Commit

Permalink
Fix condition for filtering to installed packages
Browse files Browse the repository at this point in the history
  • Loading branch information
jen-huang committed Oct 1, 2020
1 parent d0f8e5c commit 4f03dd3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ export async function getPackages(
}

// Get package names for packages which cannot have more than one package policy on an agent policy
// Assume packages only export one config template for now
// Assume packages only export one policy template for now
export async function getLimitedPackages(options: {
savedObjectsClient: SavedObjectsClientContract;
}): Promise<string[]> {
const { savedObjectsClient } = options;
const allPackages = await getPackages({ savedObjectsClient, experimental: true });
const installedPackages = allPackages.filter(
(pkg) => (pkg.status = InstallationStatus.installed)
(pkg) => pkg.status === InstallationStatus.installed
);
const installedPackagesInfo = await Promise.all(
installedPackages.map((pkgInstall) => {
Expand Down

0 comments on commit 4f03dd3

Please sign in to comment.