replaced require with ensure for jvmArgs

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97 2023-07-21 19:30:00 +03:00
parent 015f88bf83
commit ef21879df4
No known key found for this signature in database
GPG Key ID: 55EF5DA53DB36318

View File

@ -42,7 +42,7 @@ Modpack parseDirectory(QString path)
modpack.name = Json::requireString(root, "name", "name");
modpack.version = Json::requireString(root, "version", "version");
modpack.mcVersion = Json::requireString(root, "mcVersion", "mcVersion");
modpack.jvmArgs = Json::requireVariant(root, "jvmArgs", "jvmArgs");
modpack.jvmArgs = Json::ensureVariant(root, "jvmArgs", {}, "jvmArgs");
} catch (const Exception& e) {
qDebug() << "Couldn't load ftb instance json: " << e.cause();
return {};