Skip to content

Commit

Permalink
[DataEntry] Ensure analysis lang is on recent entry notes (#3518)
Browse files Browse the repository at this point in the history
  • Loading branch information
imnasnainaec authored Jan 14, 2025
1 parent 7a599d0 commit a4d814b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/DataEntry/DataEntryTable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1005,11 +1005,12 @@ export default function DataEntryTable(
const oldWord = state.recentWords[index].word;
text = text.trim();
if (text !== oldWord.note.text) {
const note: Note = { ...oldWord.note, text };
const language = oldWord.note.language || analysisLang.bcp47;
const note: Note = { ...oldWord.note, language, text };
await updateWordInBackend({ ...oldWord, note });
}
},
[state.recentWords, updateWordInBackend]
[analysisLang.bcp47, state.recentWords, updateWordInBackend]
);

const isNewEntryInProgress =
Expand Down

0 comments on commit a4d814b

Please sign in to comment.