From 39a704e2afb3e0103824d9e202de91a43853c374 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sun, 5 Sep 2021 21:07:23 -0400 Subject: Fix incorrect index being used for headword removal (#1933) --- ext/js/language/translator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/js') 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; -- cgit v1.2.3