Skip to content
Browse files

Merge pull request #20 from antifuchs/support-setting-exports

Fix module contract for modules that assign exports
  • Loading branch information...
2 parents 4dc97c2 + f94897b commit 2a8c07369796d1453ea762929cf1216e39baee10 @maccman committed Mar 11, 2013
Showing with 1 addition and 0 deletions.
  1. +1 −0 lib/assets/javascripts/sprockets/commonjs.js
View
1 lib/assets/javascripts/sprockets/commonjs.js
@@ -11,6 +11,7 @@
module = {id: path, exports: {}};
cache[path] = module.exports;
fn(module.exports, function(name) {
+ cache[path] = module.exports;
return require(name, dirname(path));
}, module);
return cache[path] = module.exports;

0 comments on commit 2a8c073

Please sign in to comment.
Something went wrong with that request. Please try again.