Skip to content

Commit

Permalink
fix: typo await
Browse files Browse the repository at this point in the history
  • Loading branch information
caohuilin committed Oct 25, 2023
1 parent 472f065 commit ccd7c4f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/generator/generator-utils/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,13 @@ export async function getModernPluginVersion(
if (typeof modernVersion !== 'string') {
return getLatetPluginVersion();
}
const version = getAvailableVersion(packageName, modernVersion, registry);
const version = await getAvailableVersion(
packageName,
modernVersion,
registry,
);
if (!(await isPackageExist(`${packageName}@${version}`))) {
return getLatetPluginVersion(packageName);
return getLatetPluginVersion();
}
return version;
}
Expand Down

0 comments on commit ccd7c4f

Please sign in to comment.