File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ module.exports = {
5454 const exportOnly = configuration . exportOnly || false ;
5555
5656 const exportedComponents = new Set ( ) ; // Track exported components
57- const validIdentifiers = [ 'ArrowFunctionExpression' , 'Identifier' , 'FunctionExpression' ] ;
57+ const validIdentifiers = new Set ( [ 'ArrowFunctionExpression' , 'Identifier' , 'FunctionExpression' ] ) ;
5858
5959 /**
6060 * Given an export declaration, find the export name.
@@ -67,7 +67,7 @@ module.exports = {
6767 }
6868 for ( const declarator of node . declaration . declarations || [ ] ) {
6969 const type = declarator . init . type ;
70- if ( validIdentifiers . find ( type ) ) {
70+ if ( validIdentifiers . has ( type ) ) {
7171 return declarator . id . name ;
7272 }
7373 }
@@ -80,7 +80,7 @@ module.exports = {
8080 */
8181 function findComponentIdentifierFromComponent ( component ) {
8282 let name ;
83- if ( component . node . parent ) {
83+ if ( component . node . parent . id ) {
8484 name = component . node . parent . id . name ;
8585 }
8686 if ( ! name ) {
You can’t perform that action at this time.
0 commit comments