fix(core): update
This commit is contained in:
parent
b8987b7913
commit
2744e1a92b
@ -122,6 +122,9 @@ export class NpmPackage {
|
|||||||
// lets find the best matching release
|
// lets find the best matching release
|
||||||
const versionStrings = this.allVersions.map((packageVersion) => packageVersion.version);
|
const versionStrings = this.allVersions.map((packageVersion) => packageVersion.version);
|
||||||
const bestMatchingVersion = targetVersion.getBestMatch(versionStrings);
|
const bestMatchingVersion = targetVersion.getBestMatch(versionStrings);
|
||||||
|
if (!bestMatchingVersion) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
tarballUrl = this.allVersions.find(
|
tarballUrl = this.allVersions.find(
|
||||||
(packageVersion) => packageVersion.version === bestMatchingVersion
|
(packageVersion) => packageVersion.version === bestMatchingVersion
|
||||||
).dist.tarball;
|
).dist.tarball;
|
||||||
@ -142,6 +145,7 @@ export class NpmPackage {
|
|||||||
console.log(err);
|
console.log(err);
|
||||||
},
|
},
|
||||||
() => {
|
() => {
|
||||||
|
done.resolve(null);
|
||||||
subscription.unsubscribe();
|
subscription.unsubscribe();
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user