Skip to content

Commit af2815f

Browse files
divmainwjhsf
andcommitted
fix: excessive verbosity
Co-authored-by: Will Harney <[email protected]>
1 parent 204c25f commit af2815f

File tree

1 file changed

+6
-6
lines changed
  • packages/@lwc/ssr-compiler/src/compile-template

1 file changed

+6
-6
lines changed

packages/@lwc/ssr-compiler/src/compile-template/context.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,29 +39,29 @@ export function createNewContext(templateOptions: TemplateOpts): {
3939
module: [] as EsStatement[],
4040
templateFn: [] as EsStatement[],
4141
};
42-
const previouslyHoistedStatementKeysMod = new Set<unknown>();
43-
const previouslyHoistedStatementKeysTmpl = new Set<unknown>();
42+
const hoistedModuleDedupe = new Set<unknown>();
43+
const hoistedTemplateDedupe = new Set<unknown>();
4444

4545
const hoist = {
4646
// Anything added here will be inserted at the top of the compiled template's
4747
// JS module.
4848
module(stmt: EsStatement, optionalDedupeKey?: unknown) {
4949
if (optionalDedupeKey) {
50-
if (previouslyHoistedStatementKeysMod.has(optionalDedupeKey)) {
50+
if (hoistedModuleDedupe.has(optionalDedupeKey)) {
5151
return;
5252
}
53-
previouslyHoistedStatementKeysMod.add(optionalDedupeKey);
53+
hoistedModuleDedupe.add(optionalDedupeKey);
5454
}
5555
hoistedStatements.module.push(stmt);
5656
},
5757
// Anything added here will be inserted at the top of the JavaScript function
5858
// corresponding to the template (typically named `__lwcTmpl`).
5959
templateFn(stmt: EsStatement, optionalDedupeKey?: unknown) {
6060
if (optionalDedupeKey) {
61-
if (previouslyHoistedStatementKeysTmpl.has(optionalDedupeKey)) {
61+
if (hoistedTemplateDedupe.has(optionalDedupeKey)) {
6262
return;
6363
}
64-
previouslyHoistedStatementKeysTmpl.add(optionalDedupeKey);
64+
hoistedTemplateDedupe.add(optionalDedupeKey);
6565
}
6666
hoistedStatements.templateFn.push(stmt);
6767
},

0 commit comments

Comments
 (0)