fix(core): update

This commit is contained in:
Philipp Kunz 2021-05-06 10:05:49 +00:00
parent 5ebce389d3
commit 6745115db7

View File

@ -92,7 +92,7 @@ export class NpmRegistry {
}): Promise<plugins.smartfile.Smartfile[]> { }): Promise<plugins.smartfile.Smartfile[]> {
const npmPackage = await this.getPackageInfo(packageNameArg); const npmPackage = await this.getPackageInfo(packageNameArg);
if (!optionsArg?.version && !optionsArg?.distTag) { if (!optionsArg?.version && !optionsArg?.distTag) {
const latestAvailable = npmPackage.allDistTags.find(packageArg => packageArg.name === 'latest'); const latestAvailable = npmPackage.allDistTags.find(packageDistTagArg => packageDistTagArg.name === 'latest');
if (!latestAvailable) { if (!latestAvailable) {
optionsArg = { optionsArg = {
version: npmPackage.getBestMatchingVersion('*') version: npmPackage.getBestMatchingVersion('*')