Revert code
This commit is contained in:
@ -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,
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user