...
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)
|
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
|
||||||
|
|
Loading…
Reference in a new issue