diff --git a/package-lock.json b/package-lock.json index aa64d2d6e0..080cb886ba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "docx", - "version": "9.4.0", + "version": "9.4.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "docx", - "version": "9.4.0", + "version": "9.4.1", "license": "MIT", "dependencies": { "@types/node": "^22.7.5", diff --git a/package.json b/package.json index 25ba66725d..1996d97b1d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "docx", - "version": "9.4.0", + "version": "9.4.1", "description": "Easily generate .docx files with JS/TS with a nice declarative API. Works for Node and on the Browser.", "type": "module", "main": "dist/index.umd.cjs", diff --git a/src/patcher/from-docx.ts b/src/patcher/from-docx.ts index f69a0e87e1..ae1f428557 100644 --- a/src/patcher/from-docx.ts +++ b/src/patcher/from-docx.ts @@ -63,8 +63,20 @@ export type PatchDocumentOptions { + if (a.length !== b.length) { + return false; + } + for (let i = 0; i < a.length; i++) { + if (a[i] !== b[i]) { + return false; + } + } + return true; +}; export const patchDocument = async ({ outputType, @@ -96,7 +108,7 @@ export const patchDocument = async