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