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.cjs.js CHANGED
@@ -2660,11 +2660,13 @@ function getWord(searchedWord, dict, kanjiDic, examples, definitions, noteTypeNa
2660
2660
  break;
2661
2661
  }
2662
2662
  }
2663
+ const hasKfExamplesWithTranslation = kanjiFormExamples.some(
2664
+ (ex) => ex.includesTranslation === true
2665
+ );
2663
2666
  if (kanjiFormExamples.length > 0 && readingMatchingKanjiForms.size > 0)
2664
2667
  kanjiFormExamples = kanjiFormExamples.filter(
2665
- (ex) => ex.includesTranslation === true && ex.form !== void 0 && readingMatchingKanjiForms.has(ex.form)
2668
+ (ex) => (!hasKfExamplesWithTranslation || ex.includesTranslation === true) && ex.form !== void 0 && readingMatchingKanjiForms.has(ex.form)
2666
2669
  );
2667
- else kanjiFormExamples.length = 0;
2668
2670
  if (readingExamples.length > 0 && readingExamples.some(
2669
2671
  (ex) => ex.includesTranslation === true || ex.referenceIDMatch === true
2670
2672
  ))