From ccfa35289b933857b6359e3970c0164a7f2f7aba Mon Sep 17 00:00:00 2001 From: Justin Ma Date: Mon, 9 May 2022 19:14:42 +0800 Subject: [PATCH] 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 --- crates/nu-command/src/formats/to/delimited.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/nu-command/src/formats/to/delimited.rs b/crates/nu-command/src/formats/to/delimited.rs index 7ad136c1da..f749c55579 100644 --- a/crates/nu-command/src/formats/to/delimited.rs +++ b/crates/nu-command/src/formats/to/delimited.rs @@ -110,7 +110,7 @@ pub fn merge_descriptors(values: &[Value]) -> Vec { _ => 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()); }