Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
nchaulet committed Feb 8, 2022
1 parent b2bd610 commit e05a365
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions x-pack/plugins/fleet/server/services/epm/packages/get.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,10 @@ export async function getPackageInfo(options: {

// If no package version is provided, use the installed version in the response
let responsePkgVersion = pkgVersion || savedObject?.attributes.install_version;

// If no installed version of the given package exists, default to the latest version of the package
if (!responsePkgVersion) {
responsePkgVersion = latestPackage.version;
}

let packageInfo: RegistryPackage | undefined;
// Look for the package locally
if (
Expand All @@ -141,7 +139,7 @@ export async function getPackageInfo(options: {
}

if (!packageInfo) {
packageInfo = await Registry.fetchInfo(pkgName, pkgVersion);
packageInfo = await Registry.fetchInfo(pkgName, responsePkgVersion);
}

// Fix the paths
Expand Down

0 comments on commit e05a365

Please sign in to comment.