Commit 63e7ce12 by Ben Drucker

Only remove undefined values from the query, not all falsy

parent 65fb40b2
...@@ -37,7 +37,7 @@ ClearbitClient.prototype.url = function (options) { ...@@ -37,7 +37,7 @@ ClearbitClient.prototype.url = function (options) {
}; };
function generateQuery (objects) { function generateQuery (objects) {
var query = _.pick(_.extend.apply(_, [{}].concat([].slice.apply(arguments))), _.identity); var query = _.omit(_.extend.apply(_, [{}].concat([].slice.apply(arguments))), _.isUndefined);
return _.isEmpty(query) ? undefined : query; return _.isEmpty(query) ? undefined : query;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment