mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 22:47:43 +02:00
Fix $in
value for insert
closure (#12209)
# Description Fixes #12193 where the `$in` value may be null for closures provided to `insert`. # User-Facing Changes The `$in` value will now always be the same as the closure parameter for `insert`.
This commit is contained in:
@ -1766,14 +1766,10 @@ impl Value {
|
||||
}
|
||||
} else {
|
||||
let new_col = if path.is_empty() {
|
||||
new_val.clone()
|
||||
new_val
|
||||
} else {
|
||||
let mut new_col = Value::record(Record::new(), new_val.span());
|
||||
new_col.insert_data_at_cell_path(
|
||||
path,
|
||||
new_val.clone(),
|
||||
head_span,
|
||||
)?;
|
||||
new_col.insert_data_at_cell_path(path, new_val, head_span)?;
|
||||
new_col
|
||||
};
|
||||
record.push(col_name, new_col);
|
||||
|
Reference in New Issue
Block a user