Remove unnecessary json parse and stringify step when importing

This commit is contained in:
Misode
2024-10-24 15:57:14 +02:00
parent 9f1ae01d91
commit ee655b39e5
7 changed files with 28 additions and 102 deletions

View File

@@ -48,7 +48,8 @@ export function ProjectCreation({ onClose }: Props) {
const file = disectFilePath(entry[0], version)
if (file) {
try {
const data = await parseSource(entry[1], 'json')
const text = await parseSource(entry[1], 'json')
const data = JSON.parse(text)
project.files!.push({ ...file, data })
return
} catch (e) {