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 = {
54
54
const exportOnly = configuration . exportOnly || false ;
55
55
56
56
const exportedComponents = new Set ( ) ; // Track exported components
57
- const validIdentifiers = [ 'ArrowFunctionExpression' , 'Identifier' , 'FunctionExpression' ] ;
57
+ const validIdentifiers = new Set ( [ 'ArrowFunctionExpression' , 'Identifier' , 'FunctionExpression' ] ) ;
58
58
59
59
/**
60
60
* Given an export declaration, find the export name.
@@ -67,7 +67,7 @@ module.exports = {
67
67
}
68
68
for ( const declarator of node . declaration . declarations || [ ] ) {
69
69
const type = declarator . init . type ;
70
- if ( validIdentifiers . find ( type ) ) {
70
+ if ( validIdentifiers . has ( type ) ) {
71
71
return declarator . id . name ;
72
72
}
73
73
}
@@ -80,7 +80,7 @@ module.exports = {
80
80
*/
81
81
function findComponentIdentifierFromComponent ( component ) {
82
82
let name ;
83
- if ( component . node . parent ) {
83
+ if ( component . node . parent . id ) {
84
84
name = component . node . parent . id . name ;
85
85
}
86
86
if ( ! name ) {
You can’t perform that action at this time.
0 commit comments