Skip to content

Commit

Permalink
fix(language-core): don't generate variable access of template refs u…
Browse files Browse the repository at this point in the history
…sing `useTemplateRef` (#5032)
  • Loading branch information
KazariEX authored Dec 6, 2024
1 parent 4d1e2d6 commit 3e462ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/language-core/lib/codegen/template/element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ function* generateReferencesForElements(
);
yield ` } */${endOfLine}`;

if (variableNameRegex.test(content)) {
if (variableNameRegex.test(content) && !options.templateRefNames.has(content)) {
ctx.accessExternalVariable(content, startOffset);
}

Expand Down

0 comments on commit 3e462ad

Please sign in to comment.