From a3ad3feaf0767deaba8627fef32530c26ec7ced8 Mon Sep 17 00:00:00 2001 From: isaacs Date: Mon, 14 Feb 2011 15:29:49 -0800 Subject: [PATCH] listopts was boolean true sometimes? weird. --- lib/ls.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ls.js b/lib/ls.js index 1a77694ce91..a4a0b63f0a2 100644 --- a/lib/ls.js +++ b/lib/ls.js @@ -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.