This commit is contained in:
Andrey Parhomenko 2024-06-09 21:47:30 +05:00
parent 02a0cb3a01
commit 7487e458f2

View file

@ -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