From 59ccb7ac19f0d93225fffb9891f28f618e41c203 Mon Sep 17 00:00:00 2001 From: sgmklp <2394501736@qq.com> Date: Mon, 17 Oct 2022 03:30:22 +0800 Subject: [PATCH] will add new Tag in translation to tag list --- javascript/tagAutocomplete.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/javascript/tagAutocomplete.js b/javascript/tagAutocomplete.js index 936ab58..c7f493f 100644 --- a/javascript/tagAutocomplete.js +++ b/javascript/tagAutocomplete.js @@ -532,11 +532,15 @@ onUiUpdate(function () { } else { allTranslations.map(x => { if (x[2]) { - for (let i = 0; i < allTags.length; i++) { + let i = 0 + for (; i < allTags.length; i++) { if (x[0] === allTags[i][0] && x[1] === allTags[i][1]) { allTags[i][2] = x[2]; } } + if (i === allTags.length) { + allTags.push(x); + } } }); }