Skip to content

Commit

Permalink
Fixed main module.path
Browse files Browse the repository at this point in the history
  • Loading branch information
kriskowal committed Dec 15, 2009
1 parent 9745db5 commit 75d7991
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/sandbox.js
Expand Up @@ -163,6 +163,8 @@ exports.Sandbox = function (options) {
};

sandbox.main = function (id, path) {
if (!path)
path = sandbox.loader.find(id)[1];
main = sandbox.main = metadata[id] = metadata[id] || Module(id, path);
sandbox(id);
return main;
Expand Down

0 comments on commit 75d7991

Please sign in to comment.