diff --git a/src/fnc/type.rs b/src/fnc/type.rs index e7444192..e540f9d5 100644 --- a/src/fnc/type.rs +++ b/src/fnc/type.rs @@ -102,8 +102,16 @@ pub fn table(_: &Runtime, mut args: Vec) -> Result { } pub fn thing(_: &Runtime, mut args: Vec) -> Result { - Ok(Value::Thing(Thing { - tb: args.remove(0).as_strand().value, - id: args.remove(0).as_strand().value, - })) + match args.remove(0) { + tb => match args.remove(0) { + Value::Thing(id) => Ok(Value::Thing(Thing { + tb: tb.as_strand().value, + id: id.id, + })), + id => Ok(Value::Thing(Thing { + tb: tb.as_strand().value, + id: id.as_strand().value, + })), + }, + } }