diff --git a/src/platform/web/ui/general/TemplateView.ts b/src/platform/web/ui/general/TemplateView.ts index 7f7f4c13..d6e3dd3f 100644 --- a/src/platform/web/ui/general/TemplateView.ts +++ b/src/platform/web/ui/general/TemplateView.ts @@ -285,10 +285,12 @@ export class TemplateBuilder { elNS(ns: string, name: string, attributesOrChildren?: Attributes | Children, children?: Children): ViewNode { let attributes: Attributes | undefined; - if (attributes !== undefined && isChildren(attributes)) { - children = attributes; - } else { - attributes = attributesOrChildren as Attributes; + if (attributesOrChildren) { + if (isChildren(attributesOrChildren)) { + children = attributesOrChildren as Children; + } else { + attributes = attributesOrChildren as Attributes; + } } const node = document.createElementNS(ns, name);