From 2a0b45dc20a6a23db47e200a3f2291b66e7d033f Mon Sep 17 00:00:00 2001 From: Dolan Date: Mon, 25 Jun 2018 21:53:01 +0100 Subject: [PATCH] make default settings in the addSection --- src/file/document/body/body.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/file/document/body/body.ts b/src/file/document/body/body.ts index 30f606af1d..1d7fcdac43 100644 --- a/src/file/document/body/body.ts +++ b/src/file/document/body/body.ts @@ -28,7 +28,11 @@ export class Body extends XmlComponent { if (section instanceof SectionProperties) { this.sections.push(section); } else { - this.sections.push(new SectionProperties(section)); + const params = { + ...this.defaultSection.Options, + ...section, + }; + this.sections.push(new SectionProperties(params)); } } public prepForXml(): IXmlableObject {