This commit is contained in:
amitm02
2018-09-04 17:16:31 +03:00
parent 010fde6258
commit 03c4190c2c
20 changed files with 363 additions and 117 deletions

View File

@ -8,12 +8,6 @@ export abstract class XmlComponent extends BaseXmlComponent {
constructor(rootKey: string, initContent? : XmlComponent) {
super(rootKey);
this.root = initContent ? initContent.root : new Array<BaseXmlComponent>();
if (initContent) {
console.log('\n\n-------\n\n');
console.log('new root', JSON.stringify(initContent, null,2));
console.log('\n\n-------\n\n');
}
}
public prepForXml(): IXmlableObject {
@ -30,7 +24,7 @@ export abstract class XmlComponent extends BaseXmlComponent {
}
return comp;
})
.filter((comp) => comp); // Exclude null, undefined, and empty strings
.filter((comp) => comp !== null); // Exclude null, undefined, and empty strings
return {
[this.rootKey]: children,
};