Skip to content

Commit

Permalink
fix(migrations): member lookup error when constructor is present (#13461
Browse files Browse the repository at this point in the history
)
  • Loading branch information
damyanpetev authored Sep 14, 2023
1 parent c6b03fa commit ef2c368
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions projects/igniteui-angular/migrations/common/tsUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -318,8 +318,10 @@ export const getTypeDefinitionAtPosition =
return null;
}

const member: ts.ClassElement = classDeclaration.members.find(m => m.name.getText() === definition.name);
if (!member?.name) {
const member: ts.ClassElement = classDeclaration.members
.filter(x => x.kind !== ts.SyntaxKind.Constructor)
.find(m => m.name?.getText() === definition.name);
if (!member) {
return null;
}

Expand Down

0 comments on commit ef2c368

Please sign in to comment.