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:
parent
d02a99f0c8
commit
cfc02e5e2b
|
@ -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]]);
|
||||
|
|
Loading…
Reference in New Issue