use lodash's default() function
This commit is contained in:
parent
b9ecb4db41
commit
251ec66eaa
|
@ -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