fixing tests

This commit is contained in:
Dolan Miu
2016-05-01 22:24:20 +01:00
parent 3f8d23662e
commit 879ac13863
9 changed files with 35 additions and 30 deletions

View File

@ -8,6 +8,8 @@ export abstract class BaseXmlComponent {
}
abstract replaceKey(): void;
clearVariables(): void {
};
}
export abstract class XmlComponent extends BaseXmlComponent {
@ -23,7 +25,9 @@ export abstract class XmlComponent extends BaseXmlComponent {
//console.log(this.root);
if (this.root !== undefined) {
this.root.forEach(root => {
root.replaceKey();
if (root && root instanceof BaseXmlComponent) {
root.replaceKey();
}
});
this[this.rootKey] = this.root;
delete this.root;