Skip to content

Commit

Permalink
more comments
Browse files Browse the repository at this point in the history
  • Loading branch information
adamraine committed Sep 8, 2020
1 parent 3066fe8 commit 14bdd92
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lighthouse-core/lib/minification-estimator.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,11 @@ function computeTokenLength(content, features) {
// Regex characters count
totalTokenLength++;
} else if (char === '{' && templateLiteralDepth) {
// Start normal code brace if inside a template literal
templateLiteralDepth.push(false);
totalTokenLength++;
} else if (char === '}' && templateLiteralDepth) {
// End one template literal if closing brace in normal code
// End one template literal if closing brace is for a template literal
if (templateLiteralDepth[templateLiteralDepth.length - 1]) {
isInString = true;
stringOpenChar = '`';
Expand Down

0 comments on commit 14bdd92

Please sign in to comment.