Permalink
Browse files

fix no such property error

  • Loading branch information...
1 parent 0898a67 commit 94df2f56d684b35d1df043660180fc321b743dc8 @juliangruber juliangruber committed with isaacs Apr 6, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/view.js
View
@@ -58,7 +58,7 @@ function view (args, silent, cb) {
// get the data about this package
registry.get(name, function (er, data) {
if (er) return cb(er)
- if (data["dist-tags"].hasOwnProperty(version)) {
+ if (data["dist-tags"] && data["dist-tags"].hasOwnProperty(version)) {
version = data["dist-tags"][version]
}
var results = []

0 comments on commit 94df2f5

Please sign in to comment.