diff --git a/src/workers/DatabaseWorker.js b/src/workers/DatabaseWorker.js index 08e5dff..dba2aca 100644 --- a/src/workers/DatabaseWorker.js +++ b/src/workers/DatabaseWorker.js @@ -86,6 +86,10 @@ let service = { */ async importData(data, databaseName, progressCallback) { const importMeta = await peakImportFile(data); + if (!importMeta.data) { + throw new Error("Uanble to parse file"); + } + let db = getDatabase({}); if (importMeta.data.databaseName !== db.name) {