Merge pull request #2858 from hzoo/i-2835
transform-regenerator: set node.id to an identifier if null - fixes #…
This commit is contained in:
commit
5508f4de56
@ -146,6 +146,10 @@ function getOuterFnExpr(funPath) {
|
||||
var node = funPath.node;
|
||||
t.assertFunction(node);
|
||||
|
||||
if (!node.id) {
|
||||
node.id = funPath.scope.parent.generateUidIdentifier("callee");
|
||||
}
|
||||
|
||||
if (node.generator && // Non-generator functions don't need to be marked.
|
||||
t.isFunctionDeclaration(node)) {
|
||||
var pp = funPath.findParent(function (path) {
|
||||
@ -171,9 +175,7 @@ function getOuterFnExpr(funPath) {
|
||||
);
|
||||
}
|
||||
|
||||
return node.id || (
|
||||
node.id = funPath.scope.parent.generateUidIdentifier("callee")
|
||||
);
|
||||
return node.id;
|
||||
}
|
||||
|
||||
function getRuntimeMarkDecl(blockPath) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user