Skip to content
Snippets Groups Projects
Commit d49c2c6b authored by Nicolas Pope's avatar Nicolas Pope
Browse files

Fix json bug in feed

parent dbe9c507
No related branches found
No related tags found
Loading
......@@ -521,7 +521,7 @@ std::string Feed::getName(const std::string &puri) {
auto n = net_->findOne<std::string>("get_cfg", puri);
if (n) {
auto j = nlohmann::json::parse(*n);
return j.value("name", j.value("uri", "No Name"));
return (j.is_structured()) ? j.value("name", j.value("uri", "No Name")) : "No Name";
}
} catch (const ftl::exception &e) {
e.ignore();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment