Spec compatibility for iteratorClose condition. (#6094)
* for-of: IteratorClose spec compatibility. See #3: https://tc39.github.io/ecma262/#sec-iteratorclose * Update spec fixtures for for-of. * Fix IteratorClose case for remap-async-to-generator. * Fix IteratorClose case for async-generator-function test output. * Modify few tests according to iteratorClose fix. * Fix iteratorClose for helpers.slicedToArray also. * Update iteratorClose fixture for commonjs.
This commit is contained in:
committed by
Henry Zhu
parent
827d84536a
commit
b2b3d7944a
@@ -164,7 +164,7 @@ function forOf() {
|
||||
_iteratorError = err;
|
||||
} finally {
|
||||
try {
|
||||
if (!_iteratorNormalCompletion && _iterator.return) {
|
||||
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
||||
_iterator.return();
|
||||
}
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user