Skip to content

Commit

Permalink
handle missing scopes in strict mode when checking iteration #1286
Browse files Browse the repository at this point in the history
  • Loading branch information
aleen42 committed Sep 1, 2023
1 parent 6912840 commit 2f6a3af
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/core-js/internals/check-correctness-of-iteration.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ try {
} catch (error) { /* empty */ }

module.exports = function (exec, SKIP_CLOSING) {
if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
try {
if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
} catch (error) { return false; } // it is not safe when the `SAFE_CLOSING` is not in the current scope
var ITERATION_SUPPORT = false;
try {
var object = {};
Expand Down

0 comments on commit 2f6a3af

Please sign in to comment.