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) el, ok := arg.(*Element)
if !ok { if !ok {
str, ok := tengo.ToString(arg) str, ok := tengo.ToString(arg)
if !ok { if ok {
return nil, tengo.ErrInvalidArgumentType{
}
}
s = append(s, &Element{ s = append(s, &Element{
Tag: RawTag, Tag: RawTag,
Content: str, Content: str,
}) })
} }
continue
}
s = append(s, el) s = append(s, el)
} }
return s, nil return s, nil