diff --git a/src/patcher/from-docx.ts b/src/patcher/from-docx.ts index 3990a7b93d..becfccf381 100644 --- a/src/patcher/from-docx.ts +++ b/src/patcher/from-docx.ts @@ -53,7 +53,7 @@ export interface PatchDocumentOptions { const imageReplacer = new ImageReplacer(); -export const patchDocument = async (data: InputDataType, options: PatchDocumentOptions): Promise => { +export const patchDocument = async (data: InputDataType, options: PatchDocumentOptions): Promise => { const zipContent = await JSZip.loadAsync(data); const contexts = new Map(); const file = { @@ -213,7 +213,7 @@ export const patchDocument = async (data: InputDataType, options: PatchDocumentO } return zip.generateAsync({ - type: "nodebuffer", + type: "uint8array", mimeType: "application/vnd.openxmlformats-officedocument.wordprocessingml.document", compression: "DEFLATE", });