diff --git a/ts/docx/paragraph/indent.ts b/ts/docx/paragraph/indent.ts index 5b4195deaf..c2136dada0 100644 --- a/ts/docx/paragraph/indent.ts +++ b/ts/docx/paragraph/indent.ts @@ -1,8 +1,8 @@ import { XmlAttributeComponent, XmlComponent } from "../xml-components"; interface IIndentAttributesProperties { - left: number; - hanging: number; + left?: number; + hanging?: number; } class IndentAttributes extends XmlAttributeComponent { diff --git a/ts/export/packer/packer.ts b/ts/export/packer/packer.ts index b7838c5ba3..a09f494ded 100644 --- a/ts/export/packer/packer.ts +++ b/ts/export/packer/packer.ts @@ -20,17 +20,18 @@ export abstract class Packer { constructor(document: Document, style?: Styles, properties?: Properties, numbering?: Numbering) { this.formatter = new Formatter(); this.document = document; - this.style = style; - this.properties = properties; - this.numbering = numbering; this.archive = archiver.create("zip", {}); - if (!style) { + if (style) { + this.style = style; + } else { const stylesFactory = new DefaultStylesFactory(); this.style = stylesFactory.newInstance(); } - if (!properties) { + if (properties) { + this.properties = properties; + } else { this.properties = new Properties({ creator: "Un-named", revision: "1", @@ -38,7 +39,9 @@ export abstract class Packer { }); } - if (!numbering) { + if (numbering) { + this.numbering = numbering; + } else { this.numbering = new Numbering(); }