Skip to content

Commit

Permalink
fix: use with babel-7 (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
ValeraS authored and remy committed Dec 1, 2018
1 parent 4cd640f commit 893ff8f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ module.exports = (timeout = 100, extra = null) => {
}

return ({ types: t, transform }) => {
const node = extra ? transform(extra).ast.program.body[0] : null;
const node = extra ?
transform(extra, { ast: true }).ast.program.body[0] : null;

let callback = null;
if (t.isExpressionStatement(node)) {
Expand Down

0 comments on commit 893ff8f

Please sign in to comment.