Skip to content
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

vm.runInNewContext() throws an error if no "context" object is given #12

Closed
TooTallNate opened this issue Feb 20, 2015 · 0 comments · Fixed by #13
Closed

vm.runInNewContext() throws an error if no "context" object is given #12

TooTallNate opened this issue Feb 20, 2015 · 0 comments · Fixed by #13

Comments

@TooTallNate
Copy link
Contributor

Repro code:

var vm = require('vm');

var foo = vm.runInNewContext('foo = "bar"');
console.log(foo);

In Node:

$ node t
bar

In the browser, via Browserify:

TypeError: Cannot set property 'foo' of undefined

screen shot 2015-02-19 at 5 54 01 pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant