Added error for invalid file
This commit is contained in:
parent
f92be8c42f
commit
1a2260515d
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user