Skip to content

Commit 2f4709c

Browse files
committed
fix: closes #58
1 parent 5f53992 commit 2f4709c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ module.exports = ({template, types}) => {
77
let pluginOptions
88
const ExportsDefaultVisitor = {
99
AssignmentExpression (path) {
10+
// Not `object.anything`, skip
11+
if (!path.get('left.object').node) {
12+
return
13+
}
14+
1015
const name = `${path.get('left.object.name').node}.${path.get(`left.property.name`).node}`
1116
if (name === 'exports.default') {
1217
const finder = new ExportsFinder(path)

0 commit comments

Comments
 (0)