Skip to content

Commit

Permalink
Merge pull request #2668 from serge-web/failing_test
Browse files Browse the repository at this point in the history
failing_test
  • Loading branch information
IanMayo authored Apr 12, 2023
2 parents fdc82df + d8cfc28 commit 138930d
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ const readZip = async (file: File, onChange: (data: Array<Wargame | Message>, fi
// Load the zip file contents asynchronously
const result = await zip.loadAsync(file)
const wargameData: Array<Wargame | Message> = []
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()
Expand All @@ -34,7 +35,7 @@ const readZip = async (file: File, onChange: (data: Array<Wargame | Message>, fi
}
}
// Call the provided 'onChange' function with the processed data and filename
onChange(wargameData, filePath)
onChange(wargameData, fileName)
} catch (error) {
console.error(error)
}
Expand Down

0 comments on commit 138930d

Please sign in to comment.