diff --git a/package-lock.json b/package-lock.json index 9910ad142d..67914e7f7b 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 aea48b2f46..624927d190 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": { 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; } } }