From 0684738ec290bffb1d277c750ae0abf58f4e9162 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Mendon=C3=A7a?= Date: Thu, 20 Sep 2018 07:09:17 -0300 Subject: [PATCH] removed lodash --- package.json | 1 - src/file/file.ts | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 84a941106b..330ad72bac 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,6 @@ "fast-xml-parser": "^3.3.6", "image-size": "^0.6.2", "jszip": "^3.1.5", - "lodash": "^4.17.11", "xml": "^1.0.1" }, "author": "Dolan Miu", diff --git a/src/file/file.ts b/src/file/file.ts index 9e45e885ac..18bae5ce71 100644 --- a/src/file/file.ts +++ b/src/file/file.ts @@ -1,4 +1,3 @@ -import { cloneDeep } from "lodash"; import { AppProperties } from "./app-properties/app-properties"; import { ContentTypes } from "./content-types/content-types"; import { CoreProperties, IPropertiesOptions } from "./core-properties"; @@ -328,7 +327,9 @@ export class File { const bookmarkId = `_TOC_${this.currentTocBookmarkId}`; // console.log("Generating content for paragraph: ", bookmarkId); - const generatedParagraph = cloneDeep(paragraph); + // deep clone the original paragraph + const generatedParagraph = Object.assign(Object.create(Object.getPrototypeOf(paragraph)), paragraph); + generatedParagraph.clearPageBreaks().rightTabStop(9016, "dot"); const tabRun = new Run();