mirror of
https://github.com/AikidoSec/safe-chain.git
synced 2026-05-26 12:10:49 +00:00
Fix check
This commit is contained in:
parent
6f962a9299
commit
4f14859351
1 changed files with 2 additions and 2 deletions
|
|
@ -17,7 +17,7 @@ export async function resolvePackageVersion(packageName, versionRange) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const packageInfo = (
|
const packageInfo = (
|
||||||
/** @type {{"dist-tags"?: Record<string, string>} | null} */
|
/** @type {{"dist-tags"?: Record<string, string>, versions?: Record<string, unknown>} | null} */
|
||||||
await getPackageInfo(packageName)
|
await getPackageInfo(packageName)
|
||||||
);
|
);
|
||||||
if (!packageInfo) {
|
if (!packageInfo) {
|
||||||
|
|
@ -27,7 +27,7 @@ export async function resolvePackageVersion(packageName, versionRange) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const distTags = packageInfo["dist-tags"];
|
const distTags = packageInfo["dist-tags"];
|
||||||
if (distTags && isDistTags(distTags)) {
|
if (distTags && isDistTags(distTags) && distTags[versionRange]) {
|
||||||
// If the version range is a dist-tag, return the version associated with that tag
|
// If the version range is a dist-tag, return the version associated with that tag
|
||||||
// e.g., "latest", "next", etc.
|
// e.g., "latest", "next", etc.
|
||||||
return distTags[versionRange];
|
return distTags[versionRange];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue