henkan 2.4.8 → 2.4.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -2597,11 +2597,13 @@ function getWord(searchedWord, dict, kanjiDic, examples, definitions, noteTypeNa
2597
2597
  break;
2598
2598
  }
2599
2599
  }
2600
+ const hasKfExamplesWithTranslation = kanjiFormExamples.some(
2601
+ (ex) => ex.includesTranslation === true
2602
+ );
2600
2603
  if (kanjiFormExamples.length > 0 && readingMatchingKanjiForms.size > 0)
2601
2604
  kanjiFormExamples = kanjiFormExamples.filter(
2602
- (ex) => ex.includesTranslation === true && ex.form !== void 0 && readingMatchingKanjiForms.has(ex.form)
2605
+ (ex) => (!hasKfExamplesWithTranslation || ex.includesTranslation === true) && ex.form !== void 0 && readingMatchingKanjiForms.has(ex.form)
2603
2606
  );
2604
- else kanjiFormExamples.length = 0;
2605
2607
  if (readingExamples.length > 0 && readingExamples.some(
2606
2608
  (ex) => ex.includesTranslation === true || ex.referenceIDMatch === true
2607
2609
  ))