handle error if right cursemod version is not found

This commit is contained in:
2021-01-22 10:54:10 +01:00
parent e2938843b8
commit cff3d36e54

View File

@ -33,6 +33,11 @@ function resolveDep(modId, callback) {
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});
rightVersion.dependencies.forEach(mod => {
if(mod.type !== 3) return;