Revert code

This commit is contained in:
Dolan
2018-09-14 02:33:36 +01:00
parent 385ad92331
commit fcbfed9068

View File

@ -3,7 +3,7 @@ import { IXmlableObject } from "./xmlable-object";
export { BaseXmlComponent }; export { BaseXmlComponent };
export abstract class XmlComponent extends BaseXmlComponent { export abstract class XmlComponent extends BaseXmlComponent {
public root: Array<BaseXmlComponent | string>; protected root: Array<BaseXmlComponent | string>;
constructor(rootKey: string, initContent?: XmlComponent) { constructor(rootKey: string, initContent?: XmlComponent) {
super(rootKey); super(rootKey);
@ -24,7 +24,7 @@ export abstract class XmlComponent extends BaseXmlComponent {
} }
return comp; return comp;
}) })
.filter((comp) => comp !== null); // Exclude null, undefined, and empty strings .filter((comp) => comp); // Exclude null, undefined, and empty strings
return { return {
[this.rootKey]: children, [this.rootKey]: children,
}; };