Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

There are cases where the files list is empty, but yet not an error

  • Loading branch information...
commit f33fb1b4ee07231e9c3987841d000a7069c94069 1 parent 2d7027d
@isaacs isaacs authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/utils/completion/file-completion.js
View
2  lib/utils/completion/file-completion.js
@@ -17,7 +17,7 @@ function fileCompletion (root, req, depth, cb) {
}
find(path.join(root, req), dirFilter, depth, function (er, files) {
if (er) return cb(er)
- return cb(null, files.map(function (f) {
+ return cb(null, (files || []).map(function (f) {
return path.join(req, f.substr(root.length + 1)
.substr((f === req ? path.dirname(req)
: req).length)
Please sign in to comment.
Something went wrong with that request. Please try again.