mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 05:04:57 +08:00
fix defaultValue on getLocalSetting and getSyncedSetting
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
de89c1f710
commit
cc53825b06
@ -139,7 +139,7 @@ module.exports = {
|
||||
|
||||
getSyncedSetting: function(type, defaultValue = null) {
|
||||
const settings = this.getSyncedSettings();
|
||||
return settings.hasOwnProperty(type) ? settings[type] : null;
|
||||
return settings.hasOwnProperty(type) ? settings[type] : defaultValue;
|
||||
},
|
||||
|
||||
setSyncedSetting: function(type, value) {
|
||||
@ -156,7 +156,7 @@ module.exports = {
|
||||
|
||||
getLocalSetting: function(type, defaultValue = null) {
|
||||
const settings = this.getLocalSettings();
|
||||
return settings.hasOwnProperty(type) ? settings[type] : null;
|
||||
return settings.hasOwnProperty(type) ? settings[type] : defaultValue;
|
||||
},
|
||||
|
||||
setLocalSetting: function(type, value) {
|
||||
|
Loading…
Reference in New Issue
Block a user