From 251ec66eaadd5828ea3db33d952e4a41500c099e Mon Sep 17 00:00:00 2001 From: jhnns Date: Fri, 4 Oct 2013 19:27:25 +0200 Subject: [PATCH] use lodash's default() function --- src/modules/config.coffee | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/modules/config.coffee b/src/modules/config.coffee index 014e8b3..341f070 100644 --- a/src/modules/config.coffee +++ b/src/modules/config.coffee @@ -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