From d8cfc2886b0c04af5973bd7e4370a0035ba7a1c8 Mon Sep 17 00:00:00 2001 From: Lilit Karapetyan Date: Wed, 12 Apr 2023 16:46:30 +0400 Subject: [PATCH] failing_test --- .../src/local/atoms/zip-dropzone/helpers/readZip.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/components/src/local/atoms/zip-dropzone/helpers/readZip.ts b/packages/components/src/local/atoms/zip-dropzone/helpers/readZip.ts index 5f51a8304a..9068f01cc5 100644 --- a/packages/components/src/local/atoms/zip-dropzone/helpers/readZip.ts +++ b/packages/components/src/local/atoms/zip-dropzone/helpers/readZip.ts @@ -9,7 +9,8 @@ const readZip = async (file: File, onChange: (data: Array, fi // Load the zip file contents asynchronously const result = await zip.loadAsync(file) const wargameData: Array = [] - const filePath = file['path'].replace('.zip', '') + + const fileName = file.name.replace('.zip', '') // Iterate over each file in the zip file for (const filename in result.files) { const fileExt = filename.split('.').pop() @@ -34,7 +35,7 @@ const readZip = async (file: File, onChange: (data: Array, fi } } // Call the provided 'onChange' function with the processed data and filename - onChange(wargameData, filePath) + onChange(wargameData, fileName) } catch (error) { console.error(error) }