diff --git a/packages/babel-plugin-transform-async-to-generator/test/fixtures/regression/4943/output.js b/packages/babel-plugin-transform-async-to-generator/test/fixtures/regression/4943/output.js index 471233145afc..036d4585a2eb 100644 --- a/packages/babel-plugin-transform-async-to-generator/test/fixtures/regression/4943/output.js +++ b/packages/babel-plugin-transform-async-to-generator/test/fixtures/regression/4943/output.js @@ -7,11 +7,13 @@ function foo(_x) { return _foo.apply(this, arguments); } function _foo() { - _foo = babelHelpers.asyncToGenerator(function* (_ref) { + _foo = babelHelpers.asyncToGenerator(function (_ref) { let a = _ref.a, _ref$b = _ref.b, b = _ref$b === void 0 ? mandatory("b") : _ref$b; - return Promise.resolve(b); + return function* () { + return Promise.resolve(b); + }(); }); return _foo.apply(this, arguments); }