Skip to content

Commit

Permalink
fix: drop duplicate hints on incomplete tag
Browse files Browse the repository at this point in the history
  • Loading branch information
KazariEX committed Aug 16, 2024
1 parent 0f14cde commit 864352f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/language-core/lib/codegen/template/element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,10 @@ export function* generateComponent(
): Generator<Code> {
const startTagOffset = node.loc.start.offset + options.template.content.substring(node.loc.start.offset).indexOf(node.tag);
const endTagOffset = !node.isSelfClosing && options.template.lang === 'html' ? node.loc.start.offset + node.loc.source.lastIndexOf(node.tag) : undefined;
const tagOffsets = endTagOffset !== undefined
? [startTagOffset, endTagOffset]
: [startTagOffset];
const tagOffsets =
endTagOffset !== undefined && endTagOffset > startTagOffset
? [startTagOffset, endTagOffset]
: [startTagOffset];
const propsFailedExps: {
node: CompilerDOM.SimpleExpressionNode;
prefix: string;
Expand Down

0 comments on commit 864352f

Please sign in to comment.