Skip to content

Commit

Permalink
chore: move tmplVar inside if block
Browse files Browse the repository at this point in the history
  • Loading branch information
cardoso committed Dec 19, 2024
1 parent 73894fe commit c216c0c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,11 @@ export function addGenerateMarkupFunction(
// At the time of generation, the invoker does not have reference to its tag name to pass as an argument.
const defaultTagName = b.literal(tagName);
const classIdentifier = b.identifier(state.lwcClassName!);
const tmplVar = b.identifier('tmpl');

let exposeTemplateBlock: IfStatement | null = null;
if (!tmplExplicitImports) {
const defaultTmplPath = `./${pathParse(filename).name}.html`;
const tmplVar = b.identifier('tmpl');
program.body.unshift(bImportDeclaration({ default: tmplVar.name }, defaultTmplPath));
program.body.unshift(
bImportDeclaration({ SYMBOL__DEFAULT_TEMPLATE: '__SYMBOL__DEFAULT_TEMPLATE' })
Expand Down

0 comments on commit c216c0c

Please sign in to comment.