mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 22:50:14 +02:00
Default the values of named params (#695)
This commit is contained in:
@ -111,14 +111,18 @@ fn eval_call(
|
||||
}
|
||||
}
|
||||
|
||||
if !found && named.arg.is_none() {
|
||||
callee_stack.add_var(
|
||||
var_id,
|
||||
Value::Bool {
|
||||
val: false,
|
||||
span: call.head,
|
||||
},
|
||||
)
|
||||
if !found {
|
||||
if named.arg.is_none() {
|
||||
callee_stack.add_var(
|
||||
var_id,
|
||||
Value::Bool {
|
||||
val: false,
|
||||
span: call.head,
|
||||
},
|
||||
)
|
||||
} else {
|
||||
callee_stack.add_var(var_id, Value::Nothing { span: call.head })
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user