From 2435ebf16e7b7b5ff1ad8435c892fcd909ae5c7a Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Fri, 30 Dec 2022 16:16:59 +0000 Subject: [PATCH 1/2] 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; } } } From a4815184706ebe57805059017c587f82ed1eb1dc Mon Sep 17 00:00:00 2001 From: Dolan Miu Date: Fri, 30 Dec 2022 16:21:00 +0000 Subject: [PATCH 2/2] Version bump --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index baced985c1..31e2c3ef04 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "docx", - "version": "7.8.0", + "version": "7.8.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "docx", - "version": "7.8.0", + "version": "7.8.1", "license": "MIT", "dependencies": { "@types/node": "^18.0.0", diff --git a/package.json b/package.json index f9f24b47b1..17ff55e378 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "docx", - "version": "7.8.0", + "version": "7.8.1", "description": "Easily generate .docx files with JS/TS with a nice declarative API. Works for Node and on the Browser.", "main": "build/index.js", "scripts": {