Commit cfc02e5e authored by Solly Ross's avatar Solly Ross

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.
parent d02a99f0
......@@ -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]]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment