File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
packages/babel-plugin-component-annotate/src Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -452,12 +452,9 @@ function collectFragmentContext(programPath: Babel.NodePath): FragmentContext {
452
452
if ( spec . imported . name === "Fragment" ) {
453
453
fragmentAliases . add ( spec . local . name ) ;
454
454
}
455
- } else if ( spec . type === "ImportDefaultSpecifier" ) {
456
- // import React from 'react' -> React
457
- reactNamespaceAliases . add ( spec . local . name ) ;
458
- } else if ( spec . type === "ImportNamespaceSpecifier" ) {
459
- // import * as React from 'react' -> React
460
- reactNamespaceAliases . add ( spec . local . name ) ;
455
+ } else if ( spec . type === "ImportDefaultSpecifier" || spec . type === "ImportNamespaceSpecifier" ) {
456
+ // import React from 'react' -> React OR
457
+ // import * as React from 'react' -> React reactNamespaceAliases.add(spec.local.name);
461
458
}
462
459
} ) ;
463
460
}
You can’t perform that action at this time.
0 commit comments