Skip to content

Commit

Permalink
fix: account for nullish attr locations
Browse files Browse the repository at this point in the history
  • Loading branch information
43081j committed Dec 17, 2022
1 parent a9248f7 commit d70bc58
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/rules/value-after-constraints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ const rule: Rule.RuleModule = {

analyzer.traverse({
enterElement: (element): void => {
if (element.tagName !== 'input' || !element.sourceCodeLocation) {
if (
element.tagName !== 'input' ||
!element.sourceCodeLocation?.attrs
) {
return;
}

Expand Down

0 comments on commit d70bc58

Please sign in to comment.