diff --git a/JL.Core/Dicts/EPWING/EpwingUtils.cs b/JL.Core/Dicts/EPWING/EpwingUtils.cs index 080ac2c2..8322d462 100644 --- a/JL.Core/Dicts/EPWING/EpwingUtils.cs +++ b/JL.Core/Dicts/EPWING/EpwingUtils.cs @@ -27,11 +27,6 @@ internal static class EpwingUtils public static bool IsValidEpwingResultForDictType(IEpwingRecord epwingRecord, Dict dict) { - if (epwingRecord.Definitions.Length is 0) - { - return false; - } - foreach (char c in epwingRecord.PrimarySpelling) { if (s_invalidCharacters.Contains(c) || char.IsWhiteSpace(c)) diff --git a/JL.Core/Dicts/EPWING/EpwingYomichan/EpwingYomichanLoader.cs b/JL.Core/Dicts/EPWING/EpwingYomichan/EpwingYomichanLoader.cs index 301f628a..eeec736f 100644 --- a/JL.Core/Dicts/EPWING/EpwingYomichan/EpwingYomichanLoader.cs +++ b/JL.Core/Dicts/EPWING/EpwingYomichan/EpwingYomichanLoader.cs @@ -50,7 +50,8 @@ public static async Task Load(Dict dict) private static void AddToDictionary(IEpwingRecord yomichanRecord, Dict dict) { - if (!EpwingUtils.IsValidEpwingResultForDictType(yomichanRecord, dict)) + if (yomichanRecord.Definitions.Length is 0 + || !EpwingUtils.IsValidEpwingResultForDictType(yomichanRecord, dict)) { return; } diff --git a/JL.Windows/DictOptionManager.cs b/JL.Windows/DictOptionManager.cs index f1009a62..3bdbe743 100644 --- a/JL.Windows/DictOptionManager.cs +++ b/JL.Windows/DictOptionManager.cs @@ -1,4 +1,3 @@ -using System.Globalization; using System.Windows.Media; using JL.Core.Dicts; using JL.Windows.Utilities;