mirror of
https://github.com/thelounge/thelounge
synced 2024-11-14 16:27:22 +00:00
Fix issue with falsey user options getting overridden by truthy defaults
This commit is contained in:
parent
aef1bb3acc
commit
bc2a37913f
1 changed files with 4 additions and 2 deletions
|
@ -25,14 +25,16 @@ const options = {
|
|||
thumbnails: true,
|
||||
userStyles: userStyles.text(),
|
||||
};
|
||||
const userOptions = JSON.parse(storage.get("settings")) || {};
|
||||
let userOptions = JSON.parse(storage.get("settings")) || {};
|
||||
|
||||
for (const key in options) {
|
||||
if (userOptions[key]) {
|
||||
if (userOptions[key] !== undefined) {
|
||||
options[key] = userOptions[key];
|
||||
}
|
||||
}
|
||||
|
||||
userOptions = null;
|
||||
|
||||
module.exports = options;
|
||||
|
||||
module.exports.shouldOpenMessagePreview = function(type) {
|
||||
|
|
Loading…
Reference in a new issue