use lodash's default() function

This commit is contained in:
jhnns 2013-10-04 19:27:25 +02:00
parent b9ecb4db41
commit 251ec66eaa
1 changed files with 1 additions and 4 deletions

View File

@ -44,10 +44,7 @@ module.exports = (cb) ->
# Make the request. # Make the request.
request.config (err, result) -> request.config (err, result) ->
# We do not strictly require config files. # We do not strictly require config files.
config = {} if err or not _.isObject result config = _.defaults result, defaults
# Tack on defaults?
( config[k] ?= v for k, v of defaults )
# RegExpify the size label? # RegExpify the size label?
if config.size_label if config.size_label