From f9774b4ce985b9920cee8afec0f756e5e1bfc9fa Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sun, 18 Apr 2021 18:08:02 -0400 Subject: Improve dictionary sequence info (#1617) * Ensure negative sequence is always -1 * Expose sequence on definition objects * Update how sequence is exposed for definitions * Update test data * Update TS docs --- ext/js/data/anki-note-data-creator.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'ext/js/data/anki-note-data-creator.js') diff --git a/ext/js/data/anki-note-data-creator.js b/ext/js/data/anki-note-data-creator.js index e3ff2ca0..1cd5aaf4 100644 --- a/ext/js/data/anki-note-data-creator.js +++ b/ext/js/data/anki-note-data-creator.js @@ -354,7 +354,7 @@ class AnkiNoteDataCreator { const definitions = []; const definitionTags = []; - for (const {tags, headwordIndices, entries, dictionary} of dictionaryEntry.definitions) { + for (const {tags, headwordIndices, entries, dictionary, sequence} of dictionaryEntry.definitions) { const definitionTags2 = []; for (const tag of tags) { definitionTags.push(this._convertTag(tag)); @@ -362,7 +362,6 @@ class AnkiNoteDataCreator { } if (!hasDefinitions) { continue; } const only = merged ? DictionaryDataUtil.getDisambiguations(dictionaryEntry.headwords, headwordIndices, allTermsSet, allReadingsSet) : void 0; - const {sequence} = dictionaryEntry; definitions.push({ sequence, dictionary, -- cgit v1.2.3