Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Commit

Permalink
listopts was boolean true sometimes? weird.
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Feb 14, 2011
1 parent 3452c61 commit a3ad3fe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/ls.js
Expand Up @@ -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.
Expand Down

0 comments on commit a3ad3fe

Please sign in to comment.