fix(nuget): use last version if no stable exists (#8327)

This commit is contained in:
Michael Kriese 2021-01-18 08:53:53 +01:00 committed by GitHub
parent 12cc30779a
commit 9bffbb6e62
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -165,6 +165,13 @@ export async function getReleases(
return null;
}
// istanbul ignore if: only happens when no stable version exists
if (latestStable === null) {
const last = catalogEntries.pop();
latestStable = removeBuildMeta(last.version);
homepage ??= last.projectUrl;
}
const dep: ReleaseResult = {
pkgName,
releases,