Skip to content

Commit

Permalink
Correct code comment [nocode]
Browse files Browse the repository at this point in the history
  • Loading branch information
overlookmotel committed Dec 11, 2023
1 parent eb80fd7 commit 8291ad0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/instrument/modify.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ function modifyAst(ast, filename, isCommonJs, isStrict, sources, evalState) {
// Create program block
const programBlock = createAndEnterBlock(blockName, true, state);
state.programBlock = programBlock;
// TODO: If code is a script or in indirect `(0, eval)(...)`,
// TODO: If code is a script or in indirect `(0, eval)(...)` in sloppy mode,
// `var` declarations and function declarations (including async functions + generator functions)
// create globals, not local bindings.
// In direct `eval()` they create bindings in hoist block external to the `eval()`.
// In sloppy-mode direct `eval()` they create bindings in hoist block external to the `eval()`.
// So in both cases, there shouldn't be a hoist block.
state.currentHoistBlock = programBlock;

Expand Down

0 comments on commit 8291ad0

Please sign in to comment.