fix: an empty array is not an array of table

This commit is contained in:
ToruNiina
2020-11-03 20:34:01 +09:00
parent 0dafa7ee42
commit a6581ee66b

View File

@@ -704,7 +704,7 @@ struct serializer
bool is_array_of_tables(const value_type& v) const
{
if(!v.is_array()) {return false;}
if(!v.is_array() || v.as_array().empty()) {return false;}
return is_array_of_tables(v.as_array());
}
bool is_array_of_tables(const array_type& v) const