fix(datasource/maven): Fix head request caching (#14521)

This commit is contained in:
Sergei Zharinov 2022-03-09 16:34:23 +03:00 committed by GitHub
parent 92d1aa53bd
commit f337d50af6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -289,9 +289,8 @@ export class MavenDatasource extends Datasource {
release.releaseTimestamp = res.toISOString();
}
if (res !== 'not-found' && res !== 'error') {
newReleaseMap[version] = release;
}
newReleaseMap[version] =
res !== 'not-found' && res !== 'error' ? release : null;
}
);
@ -302,7 +301,7 @@ export class MavenDatasource extends Datasource {
}
for (const version of Object.keys(releaseMap)) {
releaseMap[version] ||= newReleaseMap[version] ?? null;
releaseMap[version] = newReleaseMap[version] ?? null;
}
return releaseMap;