Skip to content

Commit ec2da5c

Browse files
committed
Begone ye camelCase
1 parent 0e812f9 commit ec2da5c

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

packages/rrweb-snapshot/src/rebuild.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export function applyCssSplits(
106106
if (hackCss) {
107107
adaptedCss = adaptCssForReplay(cssTextSplits.join(''), cache);
108108
}
109-
let ix_start = 0;
109+
let startIndex = 0;
110110
for (let i = 0; i < childTextNodes.length; i++) {
111111
if (i === cssTextSplits.length) {
112112
break;
@@ -115,31 +115,31 @@ export function applyCssSplits(
115115
if (!hackCss) {
116116
childTextNode.textContent = cssTextSplits[i];
117117
} else if (i < childTextNodes.length - 1) {
118-
let ix_end = ix_start;
119-
let end_search = cssTextSplits[i + 1].length;
118+
let endIndex = startIndex;
119+
let endSearch = cssTextSplits[i + 1].length;
120120

121121
// don't do hundreds of searches, in case a mismatch
122122
// is caused close to start of string
123-
end_search = Math.min(end_search, 30);
123+
endSearch = Math.min(endSearch, 30);
124124

125125
let found = false;
126-
for (; end_search > 2; end_search--) {
127-
let search_bit = cssTextSplits[i + 1].substring(0, end_search);
128-
let search_ix = adaptedCss.substring(ix_start).indexOf(search_bit);
129-
found = search_ix !== -1;
126+
for (; endSearch > 2; endSearch--) {
127+
let searchBit = cssTextSplits[i + 1].substring(0, endSearch);
128+
let searchIndex = adaptedCss.substring(startIndex).indexOf(searchBit);
129+
found = searchIndex !== -1;
130130
if (found) {
131-
ix_end += search_ix;
131+
endIndex += searchIndex;
132132
break;
133133
}
134134
}
135135
if (!found) {
136136
// something went wrong, put a similar sized chunk in the right place
137-
ix_end += cssTextSplits[i].length;
137+
endIndex += cssTextSplits[i].length;
138138
}
139-
childTextNode.textContent = adaptedCss.substring(ix_start, ix_end);
140-
ix_start = ix_end;
139+
childTextNode.textContent = adaptedCss.substring(startIndex, endIndex);
140+
startIndex = endIndex;
141141
} else {
142-
childTextNode.textContent = adaptedCss.substring(ix_start);
142+
childTextNode.textContent = adaptedCss.substring(startIndex);
143143
}
144144
}
145145
}

0 commit comments

Comments
 (0)