diff --git a/src/file/paragraph/run/run-components/text.ts b/src/file/paragraph/run/run-components/text.ts index 725eb27fa6..34b9f2edaa 100644 --- a/src/file/paragraph/run/run-components/text.ts +++ b/src/file/paragraph/run/run-components/text.ts @@ -23,11 +23,11 @@ export class Text extends XmlComponent { if (typeof options === "string") { this.root.push(new TextAttributes({ space: SpaceType.PRESERVE })); this.root.push(options); - return; + return this; } else { this.root.push(new TextAttributes({ space: options.space ?? SpaceType.DEFAULT })); this.root.push(options.text); - return; + return this; } } }