browserify/vm-browserify

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

TooTallNate opened this issue · 0 comments

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