...
This commit is contained in:
parent
02a0cb3a01
commit
7487e458f2
1 changed files with 6 additions and 7 deletions
|
@ -62,15 +62,14 @@ func MakeElements(args ...tengo.Object) ([]*Element, error) {
|
|||
el, ok := arg.(*Element)
|
||||
if !ok {
|
||||
str, ok := tengo.ToString(arg)
|
||||
if !ok {
|
||||
return nil, tengo.ErrInvalidArgumentType{
|
||||
}
|
||||
}
|
||||
if ok {
|
||||
s = append(s, &Element{
|
||||
Tag: RawTag,
|
||||
Content: str,
|
||||
})
|
||||
}
|
||||
continue
|
||||
}
|
||||
s = append(s, el)
|
||||
}
|
||||
return s, nil
|
||||
|
|
Loading…
Reference in a new issue