Skip to content

Commit

Permalink
fix(language-core): map component loc to instance variable for verifi…
Browse files Browse the repository at this point in the history
…cation
  • Loading branch information
KazariEX committed Dec 23, 2024
1 parent 4693383 commit b026d64
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion packages/language-core/lib/codegen/template/element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,20 @@ export function* generateComponent(
yield* generateElementProps(options, ctx, node, props, options.vueCompilerOptions.strictTemplates, false);
yield `}))${endOfLine}`;

yield `const ${var_componentInstance} = ${var_functionalComponent}`;
yield `const `;
yield* wrapWith(
node.loc.start.offset,
node.loc.end.offset,
{
verification: {
shouldReport(_source, code) {
return String(code) !== '6133';
},
}
},
var_componentInstance
);
yield ` = ${var_functionalComponent}`;
yield* generateComponentGeneric(ctx);
yield `(`;
yield* wrapWith(
Expand Down

0 comments on commit b026d64

Please sign in to comment.