Permalink
Browse files

fix exception that happens when a module isn't found

  • Loading branch information...
1 parent fbe339c commit 88d0a2bc7c7641ac4f3182aadb97aad57be1882b @dylang committed Aug 23, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/npm.js
View
@@ -46,7 +46,7 @@ function versions(moduleName, cb) {
if (!err) {
repo = findRepoUrl(data);
- if (!repo) {
+ if (!repo && data && data.versions) {
Object.keys(data.versions).forEach(function(version) {
if (!repo) {
repo = findRepoUrl(data.versions[version]);

0 comments on commit 88d0a2b

Please sign in to comment.