Skip to content

Commit

Permalink
Fixed getting xml attribute location in diagnostic printing
Browse files Browse the repository at this point in the history
  • Loading branch information
markwpearce committed Aug 30, 2023
1 parent 85edf5a commit 68c7c23
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bscPlugin/validation/ScopeValidator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ export class ScopeValidator {
if (isXmlScope(this.event.scope) && this.event.scope.xmlFile?.srcPath) {
info.location = util.createLocation(
URI.file(this.event.scope.xmlFile.srcPath).toString(),
this.event.scope?.xmlFile?.ast?.component?.getAttribute('name')?.value.range ?? util.createRange(0, 0, 0, 10)
this.event.scope?.xmlFile?.ast?.componentElement?.getAttribute('name')?.range ?? util.createRange(0, 0, 0, 10)
);
} else {
info.location = util.createLocation(
Expand Down

0 comments on commit 68c7c23

Please sign in to comment.