aboutsummaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/js/display/display.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/ext/js/display/display.js b/ext/js/display/display.js
index 28659294..4148cd84 100644
--- a/ext/js/display/display.js
+++ b/ext/js/display/display.js
@@ -1961,10 +1961,10 @@ class Display extends EventDispatcher {
for (const mode of modes) {
let ankiNote;
let ankiNoteException;
- const ankiNoteErrors = [];
+ const errors = [];
try {
const noteContext = this._getNoteContext();
- ankiNote = await this._createNote(dictionaryEntry, mode, noteContext, false, ankiNoteErrors);
+ ankiNote = await this._createNote(dictionaryEntry, mode, noteContext, false, errors);
} catch (e) {
ankiNoteException = e;
}
@@ -1972,6 +1972,9 @@ class Display extends EventDispatcher {
if (typeof ankiNoteException !== 'undefined') {
entry.ankiNoteException = ankiNoteException;
}
+ if (errors.length > 0) {
+ entry.errors = errors;
+ }
ankiNotes.push(entry);
}
result.ankiNotes = ankiNotes;