Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanVukovic99 committed Jan 5, 2024
1 parent 1bb59d3 commit 33fc672
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ext/js/language/translator.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,10 @@ export class Translator {
const existingHypotheses = existingEntry.inflectionHypotheses;

for (const {source, inflections} of inflectionHypotheses) {
const duplicate = existingHypotheses.find((hypothesis) => DictionaryDataUtil.areArraysEqual(hypothesis.inflections.sort(), inflections.sort()));
const duplicate = existingHypotheses.find((hypothesis) => DictionaryDataUtil.areArraysEqual(
[...hypothesis.inflections].sort(),
[...inflections].sort()
));
if (!duplicate) {
existingEntry.inflectionHypotheses.push({source, inflections});
} else if (duplicate.source !== source) {
Expand Down

0 comments on commit 33fc672

Please sign in to comment.