Merge pull request #24 from jhnns/fix-config-defaults

Use lodash's default() function
This commit is contained in:
Radek Stepan 2013-10-04 10:40:46 -07:00
commit dfeddcb4e4
1 changed files with 1 additions and 4 deletions

View File

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