Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/package_collector.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ class PackageCollector {
return this._preparePackageInfo(rawData);
}

async _checkPackageInfo(name) {
async _checkPackageInfo(name, version) {
const cache = this._getCacheInstance();

if (cache[name]) {
if (cache[name] && (!version || cache[name].versions[version])) {
return;
}

Expand All @@ -50,7 +50,7 @@ class PackageCollector {
async get(name, version) {
this._logger.log(`get info about package: ${name}@${version}`);

await this._checkPackageInfo(name);
await this._checkPackageInfo(name, version);
const cache = this._getCacheInstance();

return cache[name].versions[version];
Expand Down