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 {
452452 if ( spec . imported . name === "Fragment" ) {
453453 fragmentAliases . add ( spec . local . name ) ;
454454 }
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);
461458 }
462459 } ) ;
463460 }
You can’t perform that action at this time.
0 commit comments