mirror of
https://github.com/nushell/nushell
synced 2024-11-10 15:14:14 +00:00
Always check the row's columns.
This commit is contained in:
parent
91698b2657
commit
a74145961e
1 changed files with 9 additions and 3 deletions
|
@ -41,9 +41,15 @@ pub fn compact(
|
|||
let keep = if columns.is_empty() {
|
||||
item.is_some()
|
||||
} else {
|
||||
columns
|
||||
.iter()
|
||||
.all(|field| item.get_data(field).borrow().is_some())
|
||||
match item {
|
||||
Tagged {
|
||||
item: Value::Row(ref r),
|
||||
..
|
||||
} => columns
|
||||
.iter()
|
||||
.all(|field| r.get_data(field).borrow().is_some()),
|
||||
_ => false,
|
||||
}
|
||||
};
|
||||
|
||||
futures::future::ready(keep)
|
||||
|
|
Loading…
Reference in a new issue