From 3fd9228d816f312137986c9510cf13996d460042 Mon Sep 17 00:00:00 2001 From: Shahriar Shojib Date: Fri, 6 Sep 2024 15:46:28 +0600 Subject: [PATCH] Update GenericAnalyzer.ts TypeError: Cannot read properties of undefined (reading 'getDeclarations') --- packages/sdk/src/analyses/GenericAnalyzer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/sdk/src/analyses/GenericAnalyzer.ts b/packages/sdk/src/analyses/GenericAnalyzer.ts index 0fd6e399f..f770b643f 100644 --- a/packages/sdk/src/analyses/GenericAnalyzer.ts +++ b/packages/sdk/src/analyses/GenericAnalyzer.ts @@ -22,7 +22,7 @@ export namespace GenericAnalyzer { // MUST BE CLASS const expression: ts.Type = checker.getTypeAtLocation(hType.expression); const superNode: ts.Declaration | undefined = - expression.symbol.getDeclarations()?.[0]; + expression.symbol?.getDeclarations?.()?.[0]; if (superNode === undefined || !ts.isClassDeclaration(superNode)) continue;