Merge pull request #24 from jhnns/fix-config-defaults
Use lodash's default() function
This commit is contained in:
commit
dfeddcb4e4
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue