From cff3d36e54a113a2ea6ba0f702f2ea0912eac102 Mon Sep 17 00:00:00 2001 From: MrGeorgen Date: Fri, 22 Jan 2021 10:54:10 +0100 Subject: [PATCH] handle error if right cursemod version is not found --- src/curse.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/curse.js b/src/curse.js index e0640e4..9ac5bad 100644 --- a/src/curse.js +++ b/src/curse.js @@ -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;