fix package not found error

This commit is contained in:
Namrata Jha
2021-11-17 10:17:38 +00:00
committed by GitHub
parent 2dc6d27141
commit 8d3af2ed69
2 changed files with 4 additions and 2 deletions

View File

@@ -89,9 +89,10 @@ export function getOldestVersions(
).pipe(
map(result => {
if (result.repository.packages.edges.length < 1) {
throwError(
console.log(
`package: ${packageName} not found for owner: ${owner} in repo: ${repo}`
)
return []
}
const versions = result.repository.packages.edges[0].node.versions.edges