diff options
Diffstat (limited to 'ext/js/background/backend.js')
-rw-r--r-- | ext/js/background/backend.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ext/js/background/backend.js b/ext/js/background/backend.js index 5b133d79..e94ad065 100644 --- a/ext/js/background/backend.js +++ b/ext/js/background/backend.js @@ -458,7 +458,7 @@ class Backend { return await this._anki.addNote(note); } - async _onApiGetAnkiNoteInfo({notes}) { + async _onApiGetAnkiNoteInfo({notes, fetchAdditionalInfo}) { const results = []; const cannotAdd = []; const canAddArray = await this._anki.canAddNotes(notes); @@ -482,6 +482,9 @@ class Backend { const noteIds = noteIdsArray[i]; if (noteIds.length > 0) { cannotAdd[i].info.noteIds = noteIds; + if (fetchAdditionalInfo) { + cannotAdd[i].info.noteInfos = await this._anki.notesInfo(noteIds); + } } } } |