nu-explore: Fix pipeline rendering (#9137)

Must be fixed (but I would check).

I wonder if it was a regression caused by `Value::LazyRecord`.
I mean likely the issue was before the refactoring I did.

close #9130

---------

Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com>
This commit is contained in:
Maxim Zhiburt 2023-05-08 19:17:14 +03:00 committed by GitHub
parent d5ae979094
commit a92949b5c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -121,6 +121,13 @@ pub fn collect_input(value: Value) -> (Vec<String>, Vec<Vec<Value>>) {
(vec![String::from("")], lines) (vec![String::from("")], lines)
} }
Value::LazyRecord { val, span } => match val.collect() {
Ok(value) => collect_input(value),
Err(_) => (
vec![String::from("")],
vec![vec![Value::LazyRecord { val, span }]],
),
},
Value::Nothing { .. } => (vec![], vec![]), Value::Nothing { .. } => (vec![], vec![]),
value => (vec![String::from("")], vec![vec![value]]), value => (vec![String::from("")], vec![vec![value]]),
} }