Merge pull request #545 from DioEgizio/patch-4

This commit is contained in:
dada513 2022-05-15 21:42:51 +02:00 committed by GitHub
commit 3070565fa3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,7 +6,7 @@ void Flame::loadIndexedPack(Flame::IndexedPack& pack, QJsonObject& obj)
{ {
pack.addonId = Json::requireInteger(obj, "id"); pack.addonId = Json::requireInteger(obj, "id");
pack.name = Json::requireString(obj, "name"); pack.name = Json::requireString(obj, "name");
pack.websiteUrl = Json::ensureString(obj, "websiteUrl", ""); pack.websiteUrl = Json::ensureString(Json::ensureObject(obj, "links"), "websiteUrl", "");
pack.description = Json::ensureString(obj, "summary", ""); pack.description = Json::ensureString(obj, "summary", "");
auto logo = Json::requireObject(obj, "logo"); auto logo = Json::requireObject(obj, "logo");