DEV: Fix typo (#10)

This commit is contained in:
Jarek Radosz 2022-08-13 22:39:58 +02:00 committed by GitHub
parent 1c4f5b1a99
commit ba7ca9e588
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 6 deletions

View File

@ -168,7 +168,7 @@ export default {
let diff = 0;
let replaced = false;
let newInnnerHTML = elem.innerHTML;
let newInnerHTML = elem.innerHTML;
mapping.forEach((m) => {
if (
@ -182,12 +182,12 @@ export default {
replaced = true;
const previousLength = m.length;
const prefix = newInnnerHTML.slice(0, m.position + diff);
const suffix = newInnnerHTML.slice(
const prefix = newInnerHTML.slice(0, m.position + diff);
const suffix = newInnerHTML.slice(
m.position + diff + m.length,
newInnnerHTML.length
newInnerHTML.length
);
newInnnerHTML = `${prefix}${newValue}${suffix}`;
newInnerHTML = `${prefix}${newValue}${suffix}`;
m.length = newValue.length;
m.position = m.position + diff;
@ -195,7 +195,7 @@ export default {
});
if (replaced) {
elem.innerHTML = newInnnerHTML;
elem.innerHTML = newInnerHTML;
}
});
};