Skip to content

Commit

Permalink
Fix condition for filtering to installed packages (#79205) (#79224)
Browse files Browse the repository at this point in the history
  • Loading branch information
jen-huang authored Oct 1, 2020
1 parent ba52ef3 commit e4559f8
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 e4559f8

Please sign in to comment.