Show error when importing invalid json

This commit is contained in:
Misode
2021-08-05 00:12:30 +02:00
parent da33cc2832
commit 40fe1c5336
2 changed files with 6 additions and 1 deletions

View File

@@ -59,7 +59,7 @@ export function SourcePanel({ lang, name, model, blockStates, doCopy, doDownload
const data = JSON.parse(source.current.value)
model?.reset(data, false)
} catch (e) {
// TODO
onError(`Error importing: ${e.message}`)
}
}