Fix all default boolean options

This commit is contained in:
Guillaume Wuip 2014-10-26 12:11:01 +01:00
parent 4257d0c1cf
commit abf3bf17f9

View file

@ -135,18 +135,18 @@
* Setting default.
*/
this.opt = {
logInConsole : opt.logInConsole || true,
logInFile : opt.logInFile || true,
logInConsole : opt.logInConsole !== false,
logInFile : opt.logInFile !== false,
contextMediumSize : opt.contextMediumSize || 45,
spaceSize : opt.spaceSize || 4,
colors : opt.colors || "cyan",
alwaysTags : opt.alwaysTags || false,
alwaysLocation : opt.alwaysLocation || false,
alwaysTime : opt.alwaysTime || false,
alwaysDate : opt.alwaysDate || false
alwaysTags : opt.alwaysTags === true,
alwaysLocation : opt.alwaysLocation === true,
alwaysTime : opt.alwaysTime === true,
alwaysDate : opt.alwaysDate === true
};
/**
@ -274,10 +274,10 @@
opt = {};
}
opt.tags = opt.tags || false;
opt.location = opt.location || false;
opt.time = opt.time || false;
opt.date = opt.date || false;
opt.tags = opt.tags === true;
opt.location = opt.location === true;
opt.time = opt.time === true;
opt.date = opt.date === true;
var result = "";