fix(core): update
This commit is contained in:
@ -165,7 +165,7 @@ export class NpmPackage {
|
||||
}
|
||||
): Promise<plugins.smartfile.Smartfile> {
|
||||
const result = await this.getFilesFromPackage(filePath, optionsArg, true);
|
||||
return result[0];
|
||||
return result[0] || null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -90,7 +90,9 @@ export class NpmRegistry {
|
||||
}
|
||||
}
|
||||
const fileResult = await npmPackage.getFileFromPackage(filePathArg, optionsArg);
|
||||
this.registryCache.cacheSmartFile(cacheDescriptor, fileResult);
|
||||
if (fileResult) {
|
||||
this.registryCache.cacheSmartFile(cacheDescriptor, fileResult);
|
||||
}
|
||||
return fileResult;
|
||||
} else {
|
||||
return cachedFile;
|
||||
|
Reference in New Issue
Block a user