Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2012-09-08 21:05:51 +0400
committerisaacs <i@izs.me>2012-09-08 21:05:51 +0400
commit6c64cdad888fcfe6e86503f682cf582dcce6b1c9 (patch)
treece91aecb72c34bfe0538079c06b543ec201198b6 /lib/search.js
parentf7d681ffab6d9c66139163faeb18ff82641ebb46 (diff)
search: Coerce fields to strings
re: #2780
Diffstat (limited to 'lib/search.js')
-rw-r--r--lib/search.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/search.js b/lib/search.js
index 8a7238cb1..3e9bdb15f 100644
--- a/lib/search.js
+++ b/lib/search.js
@@ -181,7 +181,7 @@ function prettify (data, args) {
l._undent = l._undent || []
l._undent[i] = len - longest[i]
}
- l[i] = l[i].replace(/\s+/g, " ")
+ l[i] = ('' + l[i]).replace(/\s+/g, " ")
})
return l
}).sort(function (a, b) {