Skip to content
This repository has been archived by the owner on Jun 10, 2018. It is now read-only.

Commit

Permalink
Cleaned up implementation to remove code duplication.
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmccray committed Feb 11, 2011
1 parent 52e862c commit 7e24a97
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/stitch.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 1 addition & 6 deletions src/stitch.coffee
Expand Up @@ -39,12 +39,7 @@ exports.Package = class Package
var fn;
if (module) {
return module;
} else if (fn = modules[name]) {
module = { id: name, exports: {} };
fn(module.exports, require, module);
exportCache[name] = module.exports;
return module.exports;
} else if (fn = modules[name +"/index"]) {
} else if (fn = modules[name] || fn = modules[name +"/index"]) {
module = { id: name, exports: {} };
fn(module.exports, require, module);
exportCache[name] = module.exports;
Expand Down

0 comments on commit 7e24a97

Please sign in to comment.