From 94728125696ce05f5308ccbc111874e9fa936936 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Thu, 15 Jul 2010 10:52:31 -0700 Subject: [PATCH] Fix reference to root global context --- lib/module.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/module.js b/lib/module.js index 9d041999da..3d66cb19c0 100644 --- a/lib/module.js +++ b/lib/module.js @@ -400,7 +400,7 @@ Module.prototype._compile = function (content, filename) { sandbox.__filename = filename; sandbox.__dirname = dirname; sandbox.module = self; - sandbox.root = sandbox; + sandbox.root = global; Script.runInNewContext(content, sandbox, filename);