From 33fc672c1bc6dfc359ecc5360c20a015e3eb23ea Mon Sep 17 00:00:00 2001 From: Stefan Vukovic Date: Fri, 5 Jan 2024 09:55:12 +0100 Subject: [PATCH] fix --- ext/js/language/translator.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ext/js/language/translator.js b/ext/js/language/translator.js index 07ddecccd2..afc40d19b2 100644 --- a/ext/js/language/translator.js +++ b/ext/js/language/translator.js @@ -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) {