Skip to content

Commit

Permalink
fix: closes #58
Browse files Browse the repository at this point in the history
  • Loading branch information
59naga committed Jul 2, 2018
1 parent 5f53992 commit 2f4709c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ module.exports = ({template, types}) => {
let pluginOptions
const ExportsDefaultVisitor = {
AssignmentExpression (path) {
// Not `object.anything`, skip
if (!path.get('left.object').node) {
return
}

const name = `${path.get('left.object.name').node}.${path.get(`left.property.name`).node}`
if (name === 'exports.default') {
const finder = new ExportsFinder(path)
Expand Down

0 comments on commit 2f4709c

Please sign in to comment.