Merge pull request #3891 from PaulMaly/patch-1

Use `let` instead of `var` for loop index
pull/3903/head
Rich Harris 5 years ago committed by GitHub
commit ff2c85015d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -634,10 +634,10 @@ export default class ElementWrapper extends Wrapper {
}); });
block.chunks.init.push(b` block.chunks.init.push(b`
var ${levels} = [${initial_props}]; let ${levels} = [${initial_props}];
var ${data} = {}; let ${data} = {};
for (var #i = 0; #i < ${levels}.length; #i += 1) { for (let #i = 0; #i < ${levels}.length; #i += 1) {
${data} = @assign(${data}, ${levels}[#i]); ${data} = @assign(${data}, ${levels}[#i]);
} }
`); `);
@ -931,4 +931,4 @@ function to_html(wrappers: Array<ElementWrapper | TextWrapper | TagWrapper>, blo
} }
} }
}); });
} }

Loading…
Cancel
Save