Correctly return value from constructor
This commit is contained in:
@ -23,11 +23,11 @@ export class Text extends XmlComponent {
|
|||||||
if (typeof options === "string") {
|
if (typeof options === "string") {
|
||||||
this.root.push(new TextAttributes({ space: SpaceType.PRESERVE }));
|
this.root.push(new TextAttributes({ space: SpaceType.PRESERVE }));
|
||||||
this.root.push(options);
|
this.root.push(options);
|
||||||
return;
|
return this;
|
||||||
} else {
|
} else {
|
||||||
this.root.push(new TextAttributes({ space: options.space ?? SpaceType.DEFAULT }));
|
this.root.push(new TextAttributes({ space: options.space ?? SpaceType.DEFAULT }));
|
||||||
this.root.push(options.text);
|
this.root.push(options.text);
|
||||||
return;
|
return this;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user