|
@@ -26,8 +26,10 @@ export class XMLElem {
|
|
|
public elem(name:string, value: XMLElem|string|boolean|undefined|null): XMLElem {
|
|
|
if(value===undefined||value===null)
|
|
|
return this; //skip undefined/null values
|
|
|
- if(value instanceof XMLElem)
|
|
|
+ if(value instanceof XMLElem) {
|
|
|
this.elements.push(value);
|
|
|
+ return this;
|
|
|
+ }
|
|
|
this.elements.push(new XMLElem(name, value?.toString()));
|
|
|
return this;
|
|
|
}
|