From 2435ebf16e7b7b5ff1ad8435c892fcd909ae5c7a Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Fri, 30 Dec 2022 16:16:59 +0000 Subject: [PATCH] Correctly return value from constructor --- src/file/paragraph/run/run-components/text.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } } }