mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 11:47:23 +03:00
Continue to next config level after device for features
This ensures we continue checking further config levels for the feature setting if nothing is found when reading the device level. For example, this means the feature setting's default value can be used.
This commit is contained in:
parent
3801f0b78e
commit
202f6fb94d
1 changed files with 4 additions and 1 deletions
|
@ -122,7 +122,10 @@ export default class DeviceSettingsHandler extends SettingsHandler {
|
|||
}
|
||||
|
||||
const value = localStorage.getItem("mx_labs_feature_" + featureName);
|
||||
return value === "true";
|
||||
if (value === "true") return true;
|
||||
if (value === "false") return false;
|
||||
// Try to read the next config level for the feature.
|
||||
return null;
|
||||
}
|
||||
|
||||
_writeFeature(featureName, enabled) {
|
||||
|
|
Loading…
Reference in a new issue