mixin-exists allows 2 args
This commit is contained in:
parent
81c5a34211
commit
b7492a8546
@ -106,7 +106,7 @@ pub(crate) fn register(f: &mut HashMap<String, Builtin>) {
|
|||||||
f.insert(
|
f.insert(
|
||||||
"mixin-exists".to_owned(),
|
"mixin-exists".to_owned(),
|
||||||
Box::new(|args, scope| {
|
Box::new(|args, scope| {
|
||||||
max_args!(args, 1);
|
max_args!(args, 2);
|
||||||
match arg!(args, 0, "name") {
|
match arg!(args, 0, "name") {
|
||||||
Value::Ident(s, _) => Ok(Value::bool(scope.mixin_exists(&s))),
|
Value::Ident(s, _) => Ok(Value::bool(scope.mixin_exists(&s))),
|
||||||
v => Err(format!("$name: {} is not a string.", v).into()),
|
v => Err(format!("$name: {} is not a string.", v).into()),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user