summaryrefslogtreecommitdiff
path: root/ext/js
diff options
context:
space:
mode:
authorAlex Yatskov <alex@foosoft.net>2022-02-14 20:29:18 -0800
committerAlex Yatskov <alex@foosoft.net>2022-02-14 20:29:18 -0800
commitf6d65878a30ce1d12c4f9a3a3db00aa8f21d990e (patch)
treeaedd05bb2a876783e144986cf60086653a1b3e9a /ext/js
parente4ba71d15de5853d778be8ca5a8016e4fbf5db08 (diff)
parent89a939eb39faa7301a55706e04fad95a24cc57e0 (diff)
Merge branch 'master' of github.com:FooSoft/yomichan
Diffstat (limited to 'ext/js')
-rw-r--r--ext/js/data/sandbox/anki-note-data-creator.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/js/data/sandbox/anki-note-data-creator.js b/ext/js/data/sandbox/anki-note-data-creator.js
index 397228f0..96f97896 100644
--- a/ext/js/data/sandbox/anki-note-data-creator.js
+++ b/ext/js/data/sandbox/anki-note-data-creator.js
@@ -243,7 +243,7 @@ class AnkiNoteDataCreator {
_getKanjiFrequencies(dictionaryEntry) {
const results = [];
- for (const {index, dictionary, dictionaryIndex, dictionaryPriority, character, frequency, displayValue, displayValueParsed} of dictionaryEntry.frequencies) {
+ for (const {index, dictionary, dictionaryIndex, dictionaryPriority, character, frequency, displayValue} of dictionaryEntry.frequencies) {
results.push({
index,
dictionary,
@@ -252,7 +252,7 @@ class AnkiNoteDataCreator {
priority: dictionaryPriority
},
character,
- frequency: displayValueParsed ? displayValue : frequency
+ frequency: displayValue !== null ? displayValue : frequency
});
}
return results;
@@ -374,7 +374,7 @@ class AnkiNoteDataCreator {
_getTermFrequencies(dictionaryEntry) {
const results = [];
const {headwords} = dictionaryEntry;
- for (const {headwordIndex, dictionary, dictionaryIndex, dictionaryPriority, hasReading, frequency, displayValue, displayValueParsed} of dictionaryEntry.frequencies) {
+ for (const {headwordIndex, dictionary, dictionaryIndex, dictionaryPriority, hasReading, frequency, displayValue} of dictionaryEntry.frequencies) {
const {term, reading} = headwords[headwordIndex];
results.push({
index: results.length,
@@ -387,7 +387,7 @@ class AnkiNoteDataCreator {
expression: term,
reading,
hasReading,
- frequency: displayValueParsed ? displayValue : frequency
+ frequency: displayValue !== null ? displayValue : frequency
});
}
return results;
@@ -459,7 +459,7 @@ class AnkiNoteDataCreator {
_getTermExpressionFrequencies(dictionaryEntry, i) {
const results = [];
const {headwords, frequencies} = dictionaryEntry;
- for (const {headwordIndex, dictionary, dictionaryIndex, dictionaryPriority, hasReading, frequency, displayValue, displayValueParsed} of frequencies) {
+ for (const {headwordIndex, dictionary, dictionaryIndex, dictionaryPriority, hasReading, frequency, displayValue} of frequencies) {
if (headwordIndex !== i) { continue; }
const {term, reading} = headwords[headwordIndex];
results.push({
@@ -473,7 +473,7 @@ class AnkiNoteDataCreator {
expression: term,
reading,
hasReading,
- frequency: displayValueParsed ? displayValue : frequency
+ frequency: displayValue !== null ? displayValue : frequency
});
}
return results;