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:
100100 * Other types: "BlockStatement" / "ExpressionStatement" / "ReturnStatement"
101101 * Iterate through AST of every functional component declaration
102102 * 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 ) => {
104104 let declarationBody : any ;
105105 if ( functionDec . expression ?. body ) declarationBody = functionDec . expression . body . body ;
106106 // 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