fix for breaking in #725
This commit is contained in:
parent
3536d12680
commit
bec8cea583
1 changed files with 6 additions and 4 deletions
|
@ -285,10 +285,12 @@ export class TemplateBuilder<T extends IObservableValue> {
|
||||||
|
|
||||||
elNS(ns: string, name: string, attributesOrChildren?: Attributes<T> | Children<T>, children?: Children<T>): ViewNode {
|
elNS(ns: string, name: string, attributesOrChildren?: Attributes<T> | Children<T>, children?: Children<T>): ViewNode {
|
||||||
let attributes: Attributes<T> | undefined;
|
let attributes: Attributes<T> | undefined;
|
||||||
if (attributes !== undefined && isChildren(attributes)) {
|
if (attributesOrChildren) {
|
||||||
children = attributes;
|
if (isChildren(attributesOrChildren)) {
|
||||||
} else {
|
children = attributesOrChildren as Children<T>;
|
||||||
attributes = attributesOrChildren as Attributes<T>;
|
} else {
|
||||||
|
attributes = attributesOrChildren as Attributes<T>;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const node = document.createElementNS(ns, name);
|
const node = document.createElementNS(ns, name);
|
||||||
|
|
Reference in a new issue