Skip to content

Commit

Permalink
fix: using local rather then imported so access the actual variable
Browse files Browse the repository at this point in the history
in something like `import { foo as bar } from 'fee';` `foo` is the 
imported part, while `bar` is the local. we just want the local
this enables one to import other `styleNamespaces` and use them in
the component.
  • Loading branch information
webark committed Sep 19, 2018
1 parent b2cdde6 commit 7dc050f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/babel-add-style-namespace.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ module.exports = function ({ types: t }) {
},

ImportSpecifier(path) {
if (!this.found && path.get('imported').isIdentifier({ name: STYLE_NAMESPACE_PROPERTY.NAME })) {
if (!this.found && path.get('local').isIdentifier({ name: STYLE_NAMESPACE_PROPERTY.NAME })) {
this.found = true;
path.stop();
}
Expand Down

0 comments on commit 7dc050f

Please # to comment.