diff options
Diffstat (limited to 'ext/js/pages/settings/anki-templates-controller.js')
-rw-r--r-- | ext/js/pages/settings/anki-templates-controller.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/js/pages/settings/anki-templates-controller.js b/ext/js/pages/settings/anki-templates-controller.js index 56e992b0..0c82cecc 100644 --- a/ext/js/pages/settings/anki-templates-controller.js +++ b/ext/js/pages/settings/anki-templates-controller.js @@ -17,6 +17,7 @@ */ import {ExtensionError} from '../../core/extension-error.js'; +import {toError} from '../../core/to-error.js'; import {AnkiNoteBuilder} from '../../data/anki-note-builder.js'; import {querySelectorNotNull} from '../../dom/query-selector.js'; import {JapaneseUtil} from '../../language/sandbox/japanese-util.js'; @@ -266,7 +267,7 @@ export class AnkiTemplatesController { allErrors.push(...errors); } } catch (e) { - allErrors.push(e instanceof Error ? e : new Error(`${e}`)); + allErrors.push(toError(e)); } /** |