diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2021-09-05 21:07:23 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-05 21:07:23 -0400 |
commit | b988417031bc0549b1075f73cf5ebb22dad24015 (patch) | |
tree | 345b76f4f56e284945216fa5d16e416bc444ef96 /ext/js/language | |
parent | 97a80276f6ce5834ab1b9ad12309df4f6f2f3ec5 (diff) |
Fix incorrect index being used for headword removal (#1933)
Diffstat (limited to 'ext/js/language')
-rw-r--r-- | ext/js/language/translator.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/js/language/translator.js b/ext/js/language/translator.js index c35d2203..2df39299 100644 --- a/ext/js/language/translator.js +++ b/ext/js/language/translator.js @@ -535,7 +535,7 @@ class Translator { const indexRemap = new Map(); let oldIndex = 0; for (let i = 0, ii = headwords.length; i < ii; ++i) { - if (removeHeadwordIndices.has(i)) { + if (removeHeadwordIndices.has(oldIndex)) { headwords.splice(i, 1); --i; --ii; |