babel-helper-remap-async-to-generator
Advanced tools
Comparing version 6.1.2 to 6.1.4
@@ -39,3 +39,3 @@ /* @flow */ | ||
function classMethod(path /*: NodePath*/, callId /*: Object*/) { | ||
function classOrObjectMethod(path /*: NodePath*/, callId /*: Object*/) { | ||
var node = path.node; | ||
@@ -75,2 +75,4 @@ var body = node.body; | ||
if (path.isFunctionDeclaration()) { | ||
node.type = "FunctionExpression"; | ||
var declar = t.variableDeclaration("let", [t.variableDeclarator(t.identifier(asyncFnId.name), t.callExpression(container, []))]); | ||
@@ -108,4 +110,4 @@ declar._blockHoist = true; | ||
if (path.isClassMethod()) { | ||
return classMethod(path, callId); | ||
if (path.isClassMethod() || path.isObjectMethod()) { | ||
return classOrObjectMethod(path, callId); | ||
} else { | ||
@@ -112,0 +114,0 @@ return plainFunction(path, callId); |
{ | ||
"name": "babel-helper-remap-async-to-generator", | ||
"version": "6.1.2", | ||
"version": "6.1.4", | ||
"description": "", | ||
@@ -11,6 +11,6 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-helper-remap-async-to-generator", | ||
"babel-template": "^6.0.16", | ||
"babel-types": "^6.1.2", | ||
"babel-traverse": "^6.1.2", | ||
"babel-types": "^6.1.4", | ||
"babel-traverse": "^6.1.4", | ||
"babel-helper-function-name": "^6.0.15" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3703
82
Updatedbabel-traverse@^6.1.4
Updatedbabel-types@^6.1.4