Fix small bug
This commit is contained in:
parent
ca3def5372
commit
a51a275e84
|
@ -78,14 +78,14 @@ async function fetchPackageInfo(packageName) {
|
|||
async function fetchVersionsAndTags(packageName) {
|
||||
const info = await fetchPackageInfo(packageName);
|
||||
|
||||
if (!info) {
|
||||
return null;
|
||||
if (info && info.versions) {
|
||||
return {
|
||||
versions: Object.keys(info.versions),
|
||||
tags: info['dist-tags']
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
versions: Object.keys(info.versions),
|
||||
tags: info['dist-tags']
|
||||
};
|
||||
return null;
|
||||
}
|
||||
|
||||
async function getVersionsAndTags(packageName) {
|
||||
|
|
Loading…
Reference in New Issue