forked from lix-project/lix
Fix nlohmann::json exception
This commit is contained in:
parent
73c9840569
commit
4a4521f462
|
@ -64,6 +64,7 @@ void Registry::write(const Path & path)
|
||||||
nlohmann::json obj;
|
nlohmann::json obj;
|
||||||
obj["from"] = attrsToJson(std::get<0>(elem)->toAttrs());
|
obj["from"] = attrsToJson(std::get<0>(elem)->toAttrs());
|
||||||
obj["to"] = attrsToJson(std::get<1>(elem)->toAttrs());
|
obj["to"] = attrsToJson(std::get<1>(elem)->toAttrs());
|
||||||
|
if (!std::get<2>(elem).empty())
|
||||||
obj["to"].update(attrsToJson(std::get<2>(elem)));
|
obj["to"].update(attrsToJson(std::get<2>(elem)));
|
||||||
arr.emplace_back(std::move(obj));
|
arr.emplace_back(std::move(obj));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue