diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000..a657c95d5b --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +# https://prettier.io/docs/en/options.html#end-of-line +* text=auto eol=lf diff --git a/src/import-dotx/import-dotx.ts b/src/import-dotx/import-dotx.ts index 74a63b8ea4..3ef73208d8 100644 --- a/src/import-dotx/import-dotx.ts +++ b/src/import-dotx/import-dotx.ts @@ -157,7 +157,8 @@ export class ImportDotx { const hyperLinkReferences = this.findReferenceFiles(xmlRef).filter((r) => r.type === RelationshipType.HYPERLINK); for (const r of wrapperImagesReferences) { - const buffer = await zipContent.files[`word/${r.target}`].async("nodebuffer"); + const bufferType = JSZip.support.arraybuffer ? "arraybuffer" : "nodebuffer"; + const buffer = await zipContent.files[`word/${r.target}`].async(bufferType); const mediaData = media.addMedia(buffer, { width: 100, height: 100,