From 7487e458f239e2891a1ec1d7ebacecb6980c01a9 Mon Sep 17 00:00:00 2001 From: surdeus Date: Sun, 9 Jun 2024 21:47:30 +0500 Subject: [PATCH] ... --- xmodules/htmlx/element.go | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/xmodules/htmlx/element.go b/xmodules/htmlx/element.go index 1544de3..8041c52 100644 --- a/xmodules/htmlx/element.go +++ b/xmodules/htmlx/element.go @@ -62,14 +62,13 @@ 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, + }) } - s = append(s, &Element{ - Tag: RawTag, - Content: str, - }) + continue } s = append(s, el) }