Skip to content

Commit

Permalink
Remove unnecessary lodash.get
Browse files Browse the repository at this point in the history
  • Loading branch information
59naga committed Apr 26, 2016
1 parent 50253c8 commit 83d975c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@
}
},
"dependencies": {
"babel-template": "^6.5.0",
"lodash.get": "^4.2.1"
"babel-template": "^6.5.0"
},
"devDependencies": {
"abigail": "^1.6.1",
Expand Down
3 changes: 1 addition & 2 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import babelTemplate from 'babel-template'
import _get from 'lodash.get'

export default {
visitor: {
Expand All @@ -18,7 +17,7 @@ export default {
}
if (path.isExportNamedDeclaration()) {
// HACK detect export-from statements for default
const specifiers = _get(path.get('declaration'), 'container.specifiers')
const specifiers = path.get('declaration').container.specifiers
const isDefaultExportDeclaration = specifiers.length === 1 && specifiers[0].exported.name === 'default'
if (isDefaultExportDeclaration) {
hasExportDefault = true
Expand Down

0 comments on commit 83d975c

Please sign in to comment.