From 2d95092479bb18ebd77a1a2dff15545ab1b09364 Mon Sep 17 00:00:00 2001 From: j433866 Date: Wed, 3 Jul 2019 11:45:36 +0100 Subject: [PATCH] Remove no file extension error --- src/web/workers/ZipWorker.mjs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/web/workers/ZipWorker.mjs b/src/web/workers/ZipWorker.mjs index 61956a66..58e6db19 100644 --- a/src/web/workers/ZipWorker.mjs +++ b/src/web/workers/ZipWorker.mjs @@ -26,10 +26,6 @@ self.addEventListener("message", function(e) { log.error("No filename was passed to the ZipWorker"); return; } - if (!r.hasOwnProperty("fileExtension")) { - log.error("No file extension was passed to the ZipWorker"); - return; - } self.zipFiles(r.outputs, r.filename, r.fileExtension); }); @@ -55,7 +51,7 @@ self.zipFiles = async function(outputs, filename, fileExtension) { const cloned = new Dish(outputs[iNum].data.dish); const output = new Uint8Array(await cloned.get(Dish.ARRAY_BUFFER)); - if (fileExtension === "") { + if (fileExtension === undefined || fileExtension === "") { // Detect automatically const types = detectFileType(output); if (!types.length) {