Skip to content

Commit

Permalink
fix: undefined path.hub
Browse files Browse the repository at this point in the history
  • Loading branch information
Leopoldthecoder committed May 8, 2018
1 parent d41f6d6 commit 03f2687
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions src/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@ module.exports = function core(defaultLibraryName) {
},

AssignmentExpression(path, { opts }) {
if (!path.hub) {
return;
}
const { node } = path;
const { file } = path.hub;

Expand All @@ -219,6 +222,9 @@ module.exports = function core(defaultLibraryName) {
},

ArrayExpression(path, { opts }) {
if (!path.hub) {
return;
}
const { elements } = path.node;
const { file } = path.hub;

Expand Down

0 comments on commit 03f2687

Please sign in to comment.