Skip to content

Commit b026d64

Browse files
committed
fix(language-core): map component loc to instance variable for verification
1 parent 4693383 commit b026d64

File tree

1 file changed

+14
-1
lines changed
  • packages/language-core/lib/codegen/template

1 file changed

+14
-1
lines changed

packages/language-core/lib/codegen/template/element.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,20 @@ export function* generateComponent(
205205
yield* generateElementProps(options, ctx, node, props, options.vueCompilerOptions.strictTemplates, false);
206206
yield `}))${endOfLine}`;
207207

208-
yield `const ${var_componentInstance} = ${var_functionalComponent}`;
208+
yield `const `;
209+
yield* wrapWith(
210+
node.loc.start.offset,
211+
node.loc.end.offset,
212+
{
213+
verification: {
214+
shouldReport(_source, code) {
215+
return String(code) !== '6133';
216+
},
217+
}
218+
},
219+
var_componentInstance
220+
);
221+
yield ` = ${var_functionalComponent}`;
209222
yield* generateComponentGeneric(ctx);
210223
yield `(`;
211224
yield* wrapWith(

0 commit comments

Comments
 (0)