Skip to content

Commit

Permalink
Don't include empty names in duplicate name warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
amyjko committed Feb 10, 2024
1 parent 6f96048 commit 5e3b2f1
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/nodes/Bind.ts
Original file line number Diff line number Diff line change
Expand Up @@ -355,10 +355,12 @@ export default class Bind extends Expression {
for (const [, duplicate] of this.names.names.map((name1, index1) => {
return [
name1,
this.names.names.find(
(name2, index2) =>
index2 > index1 && name1.isEqualTo(name2),
),
(name1.getName() ?? '').length > 0
? this.names.names.find(
(name2, index2) =>
index2 > index1 && name1.isEqualTo(name2),
)
: undefined,
] as const;
})) {
if (duplicate) conflicts.push(new DuplicateName(this, duplicate));
Expand Down

0 comments on commit 5e3b2f1

Please sign in to comment.