summaryrefslogtreecommitdiff
path: root/ext/js
diff options
context:
space:
mode:
Diffstat (limited to 'ext/js')
-rw-r--r--ext/js/language/translator.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/js/language/translator.js b/ext/js/language/translator.js
index 729c8294..fc71bf7f 100644
--- a/ext/js/language/translator.js
+++ b/ext/js/language/translator.js
@@ -1361,8 +1361,8 @@ class Translator {
pattern.lastIndex += delta;
if (actualReplacementLength > 0) {
- sourceMap.combine(Math.max(0, index - 1), matchText.length);
sourceMap.insert(index, ...(new Array(actualReplacementLength).fill(0)));
+ sourceMap.combine(index - 1 + actualReplacementLength, matchText.length);
} else {
sourceMap.combine(index, matchText.length);
}