handle error if right cursemod version is not found
This commit is contained in:
@ -33,6 +33,11 @@ function resolveDep(modId, callback) {
|
|||||||
rightVersion = files[i];
|
rightVersion = files[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if(rightVersion === undefined) {
|
||||||
|
getData(modId, (mod) => {
|
||||||
|
console.log(`cursemod ${mod.name}: no version for the correct minecraft version and modloader found`);
|
||||||
|
});
|
||||||
|
return;
|
||||||
dep.set(String(modId), {fileId: rightVersion.id, url: rightVersion.downloadUrl, filename: rightVersion.fileName});
|
dep.set(String(modId), {fileId: rightVersion.id, url: rightVersion.downloadUrl, filename: rightVersion.fileName});
|
||||||
rightVersion.dependencies.forEach(mod => {
|
rightVersion.dependencies.forEach(mod => {
|
||||||
if(mod.type !== 3) return;
|
if(mod.type !== 3) return;
|
||||||
|
|||||||
Reference in New Issue
Block a user