File tree Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ export function getHooksNames(elementType: string): { hookName: string; varName:
100
100
* Other types: "BlockStatement" / "ExpressionStatement" / "ReturnStatement"
101
101
* Iterate through AST of every functional component declaration
102
102
* Check within each functional component declaration if there are hook declarations & variable name declaration */
103
- AST . forEach ( ( functionDec : { expression : { body : { body : { } } } , body : { body : { } } } ) => {
103
+ AST . forEach ( ( functionDec : any ) => {
104
104
let declarationBody : any ;
105
105
if ( functionDec . expression ?. body ) declarationBody = functionDec . expression . body . body ;
106
106
// check if functionDec.expression.body exists, then set declarationBody to functionDec's body
You can’t perform that action at this time.
0 commit comments