Permalink
Browse files

listopts was boolean true sometimes? weird.

  • Loading branch information...
1 parent 3452c61 commit a3ad3feaf0767deaba8627fef32530c26ec7ced8 @isaacs isaacs committed Feb 14, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/ls.js
View
@@ -43,7 +43,8 @@ ls.completion = function (args, index, cb) {
function ls (args, silent, staleness, cb_) {
if (typeof cb_ !== "function") cb_ = staleness, staleness = 600
if (typeof cb_ !== "function") cb_ = silent, silent = false
- var listopts = npm.config.get("listopts") || ""
+ var listopts = npm.config.get("listopts")
+ if (typeof listopts !== "string") listopts = ""
listopts = listopts.split(/\s+/)
getFilteredData(staleness, listopts.concat(args), function (er, data) {
// now data is the list of data that we want to show.

0 comments on commit a3ad3fe

Please sign in to comment.