diff --git a/crates/nu-explore/src/nu_common/value.rs b/crates/nu-explore/src/nu_common/value.rs index 109f1a441e..c05931d194 100644 --- a/crates/nu-explore/src/nu_common/value.rs +++ b/crates/nu-explore/src/nu_common/value.rs @@ -184,7 +184,7 @@ fn record_lookup_value(item: &Value, header: &str) -> Value { item.clone() .follow_cell_path(&[path], false) - .unwrap_or_else(|_| item.clone()) + .unwrap_or_else(|_| unknown_error_value()) } item => item.clone(), } @@ -220,3 +220,7 @@ pub fn map_into_value(hm: HashMap) -> Value { pub fn nu_str>(s: S) -> Value { Value::string(s.as_ref().to_owned(), NuSpan::unknown()) } + +fn unknown_error_value() -> Value { + Value::string(String::from("❎"), NuSpan::unknown()) +}