From cfc02e5e2bccfe2c1a80e4097372b8423ce9d87a Mon Sep 17 00:00:00 2001 From: Solly Ross Date: Fri, 19 Sep 2014 14:48:00 -0400 Subject: Fixed presence detection bug in utils.set_defaults Previously, Utils.set_defaults was using `if(conf[keys[i]])` to check for the presence of a configuration key. This would fail if `conf[keys[i]]` happened to be false. Instead, we now use `if(keys[i] in conf)`, which simply checks for the presence of the key in the conf object. --- include/util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/util.js b/include/util.js index a6045da..9e5f98c 100644 --- a/include/util.js +++ b/include/util.js @@ -346,7 +346,7 @@ Util.set_defaults = function (obj, conf, defaults) { continue; } - if (conf[keys[i]]) { + if (keys[i] in conf) { setter.call(obj, conf[keys[i]]); } else { setter.call(obj, defaults[keys[i]]); -- cgit v1.2.1