Skip to content

Commit 938eb53

Browse files
committed
Explicit failure for wrong settings importation formats.
1 parent 2fd03a8 commit 938eb53

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

src/bg/Settings.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ var Settings = {
1515
return await this.importSettings(json);
1616
}
1717
} catch (e) {
18-
return await this.importLists(data);
18+
if (data.includes("[UNTRUSTED]")) await this.importLists(data);
19+
else throw e;
1920
}
2021
},
2122

src/ui/options.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@
5757
await UI.importSettings(fr.result);
5858
} catch (e) {
5959
error(e, "Importing settings %s", fr.result);
60+
alert(e);
61+
return;
6062
}
6163
location.reload();
6264
}

0 commit comments

Comments
 (0)