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.
This commit is contained in:
Solly Ross 2014-09-19 14:48:00 -04:00
parent d02a99f0c8
commit cfc02e5e2b
1 changed files with 1 additions and 1 deletions

View File

@ -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]]);