From fafa54e4c94aee34deae8e15c8d53a1149f6b7ea Mon Sep 17 00:00:00 2001 From: amitm02 Date: Wed, 26 Sep 2018 13:10:21 +0300 Subject: [PATCH] bug fix (demo29 corrupted) --- src/file/file.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/file/file.ts b/src/file/file.ts index 3bf43eb9d7..81920a2ad2 100644 --- a/src/file/file.ts +++ b/src/file/file.ts @@ -53,6 +53,10 @@ export class File { this.footNotes = new FootNotes(); this.contentTypes = new ContentTypes(); + if (fileProperties.template) { + this.currentRelationshipId = fileProperties.template.currentRelationshipId + 1; + } + if (options.externalStyles) { const stylesFactory = new ExternalStylesFactory(); this.styles = stylesFactory.newInstance(options.externalStyles); @@ -63,10 +67,6 @@ export class File { this.addDefaultRelationships(); - if (fileProperties.template) { - this.currentRelationshipId = fileProperties.template.currentRelationshipId + 1; - } - if (fileProperties.template && fileProperties.template.headers) { for (const templateHeader of fileProperties.template.headers) { this.addHeaderToDocument(templateHeader.header, templateHeader.type);