aboutsummaryrefslogtreecommitdiff
path: root/ext/bg/js/settings/dictionaries.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-04-05 18:26:38 -0400
committertoasted-nutbread <toasted-nutbread@users.noreply.github.com>2020-04-05 18:26:38 -0400
commit7449ffd4dc74ea79c1e7337a6402b1c697c0a875 (patch)
tree25c6ef657e25f5966f35baa6d4f70d6d848ae793 /ext/bg/js/settings/dictionaries.js
parent3df78904cf734da208c6fd1b6ae1cd6612323148 (diff)
Fix error reporting during dictionary import
Diffstat (limited to 'ext/bg/js/settings/dictionaries.js')
-rw-r--r--ext/bg/js/settings/dictionaries.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/bg/js/settings/dictionaries.js b/ext/bg/js/settings/dictionaries.js
index 5e59cc3d..ed883869 100644
--- a/ext/bg/js/settings/dictionaries.js
+++ b/ext/bg/js/settings/dictionaries.js
@@ -643,9 +643,9 @@ async function onDictionaryImport(e) {
await settingsSaveOptions();
if (errors.length > 0) {
- errors.push(...errors);
- errors.push(`Dictionary may not have been imported properly: ${errors.length} error${errors.length === 1 ? '' : 's'} reported.`);
- dictionaryErrorsShow(errors);
+ const errors2 = errors.map((error) => jsonToError(error));
+ errors2.push(`Dictionary may not have been imported properly: ${errors2.length} error${errors2.length === 1 ? '' : 's'} reported.`);
+ dictionaryErrorsShow(errors2);
}
onDatabaseUpdated();