Explicit failure for wrong settings importation formats.

This commit is contained in:
hackademix 2020-12-10 13:13:25 +01:00
parent 2fd03a8e20
commit 938eb53576
2 changed files with 4 additions and 1 deletions

View File

@ -15,7 +15,8 @@ var Settings = {
return await this.importSettings(json);
}
} catch (e) {
return await this.importLists(data);
if (data.includes("[UNTRUSTED]")) await this.importLists(data);
else throw e;
}
},

View File

@ -57,6 +57,8 @@
await UI.importSettings(fr.result);
} catch (e) {
error(e, "Importing settings %s", fr.result);
alert(e);
return;
}
location.reload();
}