diff --git a/src/export/packer/next-compiler.spec.ts b/src/export/packer/next-compiler.spec.ts index 2ac32dda33..dec853ba68 100644 --- a/src/export/packer/next-compiler.spec.ts +++ b/src/export/packer/next-compiler.spec.ts @@ -17,7 +17,7 @@ describe("Compiler", () => { describe("#compile()", () => { it("should pack all the content", async function() { this.timeout(99999999); - const zipFile = await compiler.compile(file); + const zipFile = compiler.compile(file); const fileNames = Object.keys(zipFile.files).map((f) => zipFile.files[f].name); expect(fileNames).is.an.instanceof(Array); @@ -46,7 +46,7 @@ describe("Compiler", () => { this.timeout(99999999); - const zipFile = await compiler.compile(file); + const zipFile = compiler.compile(file); const fileNames = Object.keys(zipFile.files).map((f) => zipFile.files[f].name); expect(fileNames).is.an.instanceof(Array); diff --git a/src/export/packer/next-compiler.ts b/src/export/packer/next-compiler.ts index 44af788cb0..e97a155b01 100644 --- a/src/export/packer/next-compiler.ts +++ b/src/export/packer/next-compiler.ts @@ -36,7 +36,7 @@ export class Compiler { this.imageReplacer = new ImageReplacer(); } - public async compile(file: File): Promise { + public compile(file: File): JSZip { const zip = new JSZip(); const xmlifiedFileMapping = this.xmlifyFile(file); diff --git a/src/export/packer/packer.ts b/src/export/packer/packer.ts index 856f74b59e..5f4c12c66f 100644 --- a/src/export/packer/packer.ts +++ b/src/export/packer/packer.ts @@ -9,7 +9,7 @@ export class Packer { } public async toBuffer(file: File): Promise { - const zip = await this.compiler.compile(file); + const zip = this.compiler.compile(file); const zipData = (await zip.generateAsync({ type: "nodebuffer", mimeType: "application/vnd.openxmlformats-officedocument.wordprocessingml.document", @@ -19,7 +19,7 @@ export class Packer { } public async toBase64String(file: File): Promise { - const zip = await this.compiler.compile(file); + const zip = this.compiler.compile(file); const zipData = (await zip.generateAsync({ type: "base64", mimeType: "application/vnd.openxmlformats-officedocument.wordprocessingml.document", @@ -29,7 +29,7 @@ export class Packer { } public async toBlob(file: File): Promise { - const zip = await this.compiler.compile(file); + const zip = this.compiler.compile(file); const zipData = (await zip.generateAsync({ type: "blob", mimeType: "application/vnd.openxmlformats-officedocument.wordprocessingml.document",