Files
e5c0bbc8e7 fix: Transform for await with shadowed variables (#15235)
* fix

* review

* Update packages/babel-preset-env/test/fixtures/plugins-integration/issue-11610/options.json

Co-authored-by: Nicolò Ribaudo <[email protected]>

* fix

* Update packages/babel-plugin-proposal-async-generator-functions/src/index.ts

Co-authored-by: Nicolò Ribaudo <[email protected]>
2022-12-14 19:36:12 -05:00

25 lines
719 B
JavaScript

async function v() {
let source = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 2;
var _iteratorAbruptCompletion = false;
var _didIteratorError = false;
var _iteratorError;
try {
for (var _iterator = babelHelpers.asyncIterator([1]), _step; _iteratorAbruptCompletion = !(_step = await _iterator.next()).done; _iteratorAbruptCompletion = false) {
source = _step.value;
}
} catch (err) {
_didIteratorError = true;
_iteratorError = err;
} finally {
try {
if (_iteratorAbruptCompletion && _iterator.return != null) {
await _iterator.return();
}
} finally {
if (_didIteratorError) {
throw _iteratorError;
}
}
}
}