Skip to content

Commit

Permalink
Fix: 細かなエラー修正
Browse files Browse the repository at this point in the history
  • Loading branch information
tsukumijima committed Jan 6, 2025
1 parent 93e56bc commit 98927d1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/components/Dialog/DictionaryManageDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,10 @@ const wordTypeLabels = {
};
// 品詞フィールドから WordTypes を推定する関数
const getWordTypeFromPartOfSpeech = (dictData: UserDictWord): WordTypes => {
const getWordTypeFromPartOfSpeech = (dictData: UserDictWord | undefined): WordTypes => {
// 基本ないが、もし dictData が undefined の場合は固有名詞として扱う
if (!dictData) return WordTypes.ProperNoun;
const { partOfSpeech, partOfSpeechDetail1, partOfSpeechDetail2, partOfSpeechDetail3 } = dictData;
if (partOfSpeech === "名詞") {
if (partOfSpeechDetail1 === "固有名詞") {
Expand Down

0 comments on commit 98927d1

Please sign in to comment.