Fix to csv and to tsv for simple list, close: #4780 (#5483)

* Fix `to csv` and `to tsv` for simple list, close: #4780

* ci skip
This commit is contained in:
Justin Ma 2022-05-09 19:14:42 +08:00 committed by GitHub
parent 54fc164e1c
commit ccfa35289b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -110,7 +110,7 @@ pub fn merge_descriptors(values: &[Value]) -> Vec<String> {
_ => vec!["".to_string()],
};
for desc in data_descriptors {
if !seen.contains(&desc) {
if !desc.is_empty() && !seen.contains(&desc) {
seen.insert(desc.to_string());
ret.push(desc.to_string());
}