0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-16 17:08:20 +02:00

ircd:Ⓜ️:room::power: Prevent exception on json::type() for no collection.

This commit is contained in:
Jason Volk 2019-08-07 02:44:47 -07:00
parent 6f6f6c6451
commit f558ac1a28

View file

@ -4641,7 +4641,8 @@ const
prop? json::object{content.get(prop)} : content
};
if(prop && json::type(string_view{collection}) != json::OBJECT)
const string_view _collection{collection};
if(prop && (!_collection || json::type(_collection) != json::OBJECT))
return;
for(auto it(begin(collection)); it != end(collection) && ret; ++it)