summaryrefslogtreecommitdiff
path: root/ext/js/data/anki-note-data-creator.js
diff options
context:
space:
mode:
authortoasted-nutbread <toasted-nutbread@users.noreply.github.com>2021-04-18 18:08:02 -0400
committerGitHub <noreply@github.com>2021-04-18 18:08:02 -0400
commitf9774b4ce985b9920cee8afec0f756e5e1bfc9fa (patch)
tree0c89f0eeeb09e40bbf96145266bb6bcfbae9ae99 /ext/js/data/anki-note-data-creator.js
parent609d4fe3347f87290a428e2ba1192acb991b2e38 (diff)
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
Diffstat (limited to 'ext/js/data/anki-note-data-creator.js')
-rw-r--r--ext/js/data/anki-note-data-creator.js3
1 files changed, 1 insertions, 2 deletions
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,