Fixed incorrect compilation of async iterator methods (#4719)
This commit is contained in:
parent
9fc51d6292
commit
dc4140dc5f
@ -90,6 +90,10 @@ function classOrObjectMethod(path: NodePath, callId: Object) {
|
||||
[]
|
||||
))
|
||||
];
|
||||
|
||||
// Regardless of whether or not the wrapped function is a an async method
|
||||
// or generator the outer function should not be
|
||||
node.generator = false;
|
||||
}
|
||||
|
||||
function plainFunction(path: NodePath, callId: Object) {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
class C {
|
||||
*g() {
|
||||
g() {
|
||||
var _this = this;
|
||||
|
||||
return babelHelpers.asyncGenerator.wrap(function* () {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
({
|
||||
*g() {
|
||||
g() {
|
||||
var _this = this;
|
||||
|
||||
return babelHelpers.asyncGenerator.wrap(function* () {
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
class C {
|
||||
static *g() {
|
||||
static g() {
|
||||
var _this = this;
|
||||
|
||||
return babelHelpers.asyncGenerator.wrap(function* () {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user