Fix nlohmann::json exception
This commit is contained in:
parent
73c9840569
commit
4a4521f462
1 changed files with 2 additions and 1 deletions
|
@ -64,7 +64,8 @@ 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());
|
||||||
obj["to"].update(attrsToJson(std::get<2>(elem)));
|
if (!std::get<2>(elem).empty())
|
||||||
|
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