Fix incorrect index being used for headword removal (#1933)
This commit is contained in:
parent
97a80276f6
commit
b988417031
@ -535,7 +535,7 @@ class Translator {
|
|||||||
const indexRemap = new Map();
|
const indexRemap = new Map();
|
||||||
let oldIndex = 0;
|
let oldIndex = 0;
|
||||||
for (let i = 0, ii = headwords.length; i < ii; ++i) {
|
for (let i = 0, ii = headwords.length; i < ii; ++i) {
|
||||||
if (removeHeadwordIndices.has(i)) {
|
if (removeHeadwordIndices.has(oldIndex)) {
|
||||||
headwords.splice(i, 1);
|
headwords.splice(i, 1);
|
||||||
--i;
|
--i;
|
||||||
--ii;
|
--ii;
|
||||||
|
Loading…
Reference in New Issue
Block a user