Don't mark async functions as hoist

`babel-template` no longer crashes in IE attempting to access unpopulated error stack
This commit is contained in:
Sławomir Laskowski 2015-11-29 01:44:30 +01:00
parent afd68f47dd
commit d34cb69912
3 changed files with 4 additions and 1 deletions

View File

@ -70,7 +70,6 @@ function plainFunction(path: NodePath, callId: Object) {
t.callExpression(container, [])
)
]);
declar._blockHoist = true;
retFunction.id = asyncFnId;
path.replaceWith(declar);

View File

@ -1,3 +1,5 @@
function normalFunction() {}
async function foo() {
var wat = await bar();
}

View File

@ -1,3 +1,5 @@
function normalFunction() {}
let foo = (function () {
var ref = babelHelpers.asyncToGenerator(function* () {
var wat = yield bar();