-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Losing reference to module when using lodash=_
#22
Comments
Yeah, I can reproduce this is as well. It seems like assigning via context does not work the same as assigning inside the repl instance. See the following example:
Tried to defining |
Per the Node.js documentation:
(source) We can file a bug. I'd like to see consistency between respecting assignment and vars provided via a context object. However, since the REPL is in Node.js core, older and current versions will never get the fix... so with an eye towards our user experience, I think we should patch this on our side. |
Potential fixes: 1. Programmatically assign
|
Yeah, I'm leaning towards option 2 as I think it would work longer (considering that eval changes) and require less magic that people working in the repl might not be used to. Haven't really fully made up my mind though... |
trymodule@1.4.0 on node 4.2.1.
It may have something to do with using
_
as the local variable.Can someone try to reproduce this?
The text was updated successfully, but these errors were encountered: