You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
REPL: {} instanceof Object === false with nodejs 11 and nodejs 12 #27859
Activity
bnoordhuis commentedon May 24, 2019
It's caused by this code:
node/lib/repl.js
Lines 877 to 880 in 5b8df5e
That copies the
Objectfrom the main context to the REPL context.I'm not completely sure what commit introduced this but cc @BridgeAR since you were the last one to touch that code. :-)
Workaround until it's fixed:
repl.start({ prompt: '> ', useGlobal: true })iam4x commentedon May 24, 2019
Hi @bnoordhuis, thank you for the workaround.
With some more experiments, I can reproduce on nodejs 10 the bug with this piece of code:
But with
{ useGlobal: true }it does work correctly:starkwang commentedon May 29, 2019
Maybe this bug is related to e3055dc?
cc @BridgeAR.
repl: fix some repl context issues
repl: fix some repl context issues
Please ignore this msg (#1)
ZYSzys commentedon Dec 9, 2019
Closed since it was already fixed via #28561.