Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed config options object overriding choices

  • Loading branch information...
commit 93dc738fdf06bee5a1e4d8cb411436b39a2500ce 1 parent f0a43de
@zertosh zertosh authored isaacs committed
Showing with 3 additions and 1 deletion.
  1. +3 −1 read-installed.js
View
4 read-installed.js
@@ -106,7 +106,9 @@ function readInstalled (folder, opts, cb) {
cb = opts
opts = {}
}
- var depth = Infinity || opts.depth, log = function () {} || opts.log, dev = false || opts.dev
+ var depth = (typeof opts.depth === 'number') ? opts.depth : Infinity
+ , log = (typeof opts.log === 'function') ? opts.log : function () {}
+ , dev = !!opts.dev;
readInstalled_(folder, null, null, null, 0, depth, dev, function (er, obj) {
if (er) return cb(er)
Please sign in to comment.
Something went wrong with that request. Please try again.