Skip to content

Commit 893ff8f

Browse files
ValeraSremy
authored andcommitted
fix: use with babel-7 (#21)
1 parent 4cd640f commit 893ff8f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ module.exports = (timeout = 100, extra = null) => {
7979
}
8080

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

8485
let callback = null;
8586
if (t.isExpressionStatement(node)) {

0 commit comments

Comments
 (0)