When using the repl and e.g., writing: const foo = bar() while bar is undefined is going to cause an error. So far so good. The problem is that foo is now assigned even though it would be super nice if that would not be the case due to the error while assigning the variable.
I tried to see how to fix this on my own but it is somewhere in runInContext if I am not mistaken and I have never looked at that part before.
@nodejs/vm @nodejs/repl
When using the repl and e.g., writing:
const foo = bar()whilebaris undefined is going to cause an error. So far so good. The problem is thatfoois now assigned even though it would be super nice if that would not be the case due to the error while assigning the variable.I tried to see how to fix this on my own but it is somewhere in runInContext if I am not mistaken and I have never looked at that part before.
@nodejs/vm @nodejs/repl