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:
parent
afd68f47dd
commit
d34cb69912
@ -70,7 +70,6 @@ function plainFunction(path: NodePath, callId: Object) {
|
|||||||
t.callExpression(container, [])
|
t.callExpression(container, [])
|
||||||
)
|
)
|
||||||
]);
|
]);
|
||||||
declar._blockHoist = true;
|
|
||||||
|
|
||||||
retFunction.id = asyncFnId;
|
retFunction.id = asyncFnId;
|
||||||
path.replaceWith(declar);
|
path.replaceWith(declar);
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
function normalFunction() {}
|
||||||
|
|
||||||
async function foo() {
|
async function foo() {
|
||||||
var wat = await bar();
|
var wat = await bar();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,3 +1,5 @@
|
|||||||
|
function normalFunction() {}
|
||||||
|
|
||||||
let foo = (function () {
|
let foo = (function () {
|
||||||
var ref = babelHelpers.asyncToGenerator(function* () {
|
var ref = babelHelpers.asyncToGenerator(function* () {
|
||||||
var wat = yield bar();
|
var wat = yield bar();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user