Skip to content

Commit

Permalink
pkg.main may be a directory
Browse files Browse the repository at this point in the history
  • Loading branch information
dodo committed Jul 10, 2012
1 parent a964396 commit 3521c2f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions index.js
Expand Up @@ -65,6 +65,8 @@ exports.sync = function (x, opts) {
if (pkg.main) {
var m = loadAsFileSync(path.resolve(x, pkg.main));
if (m) return m;
var n = loadAsDirectorySync(path.resolve(x, pkg.main));
if (n) return n;
}
}
catch (err) {}
Expand Down

0 comments on commit 3521c2f

Please sign in to comment.