summaryrefslogtreecommitdiff
path: root/ext/js/data
diff options
context:
space:
mode:
Diffstat (limited to 'ext/js/data')
-rw-r--r--ext/js/data/anki-note-data-creator.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/js/data/anki-note-data-creator.js b/ext/js/data/anki-note-data-creator.js
index c76369c3..6a6bfd36 100644
--- a/ext/js/data/anki-note-data-creator.js
+++ b/ext/js/data/anki-note-data-creator.js
@@ -274,7 +274,7 @@ class AnkiNoteDataCreator {
case 'merge': type = 'termMerged'; break;
}
- const {ids, inflections, score, dictionaryIndex, dictionaryPriority, sourceTermExactMatchCount} = dictionaryEntry;
+ const {inflections, score, dictionaryIndex, dictionaryPriority, sourceTermExactMatchCount, definitions} = dictionaryEntry;
const {
screenshotFileName=null,
@@ -301,7 +301,7 @@ class AnkiNoteDataCreator {
return {
type,
- id: (type === 'term' ? ids[0] : void 0),
+ id: (type === 'term' && definitions.length > 0 ? definitions[0].id : void 0),
source: (primarySource !== null ? primarySource.transformedText : null),
rawSource: (primarySource !== null ? primarySource.originalText : null),
sourceTerm: (type !== 'termMerged' ? (primarySource !== null ? primarySource.deinflectedText : null) : void 0),