From cce1872c36ff3f3f7e3acd397eb44ee027b1b05d Mon Sep 17 00:00:00 2001 From: Nick the Sick Date: Wed, 5 Mar 2025 11:44:45 +0100 Subject: [PATCH] fix: pull from the default export which is available in both ESM and CJS (#1468) --- packages/xl-docx-exporter/src/docx/docxExporter.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/xl-docx-exporter/src/docx/docxExporter.ts b/packages/xl-docx-exporter/src/docx/docxExporter.ts index 7b0c8cc08..6d95eb44f 100644 --- a/packages/xl-docx-exporter/src/docx/docxExporter.ts +++ b/packages/xl-docx-exporter/src/docx/docxExporter.ts @@ -154,7 +154,7 @@ export class DOCXExporter< geistMonoFont instanceof Uint8Array ) { // conversion with Polyfill needed because docxjs requires Buffer - const Buffer = (await import("buffer")).Buffer; + const Buffer = (await import("buffer")).default.Buffer; if (interFont instanceof ArrayBuffer) { interFont = Buffer.from(interFont); @@ -243,7 +243,7 @@ export class DOCXExporter< try { if (!globalThis.Buffer) { // load Buffer polyfill because docxjs requires this - globalThis.Buffer = (await import("buffer")).Buffer; + globalThis.Buffer = (await import("buffer")).default.Buffer; } return Packer.toBlob(doc); } finally {