mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-17 22:14:58 +08:00
Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
commit
efc906dd0f
@ -36,13 +36,21 @@ export default {
|
||||
getLabsFeatures() {
|
||||
const featuresConfig = SdkConfig.get()['features'] || {};
|
||||
|
||||
return FEATURES.filter((f) => {
|
||||
const sdkConfigValue = featuresConfig[f.id];
|
||||
// The old flag: honourned for backwards compat
|
||||
const enableLabs = SdkConfig.get()['enableLabs'];
|
||||
|
||||
if (sdkConfigValue === 'labs') {
|
||||
return true;
|
||||
}
|
||||
}).map((f) => {
|
||||
let labsFeatures;
|
||||
if (enableLabs) {
|
||||
labsFeatures = FEATURES;
|
||||
} else {
|
||||
labsFeatures.filter((f) => {
|
||||
const sdkConfigValue = featuresConfig[f.id];
|
||||
if (sdkConfigValue === 'labs') {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
}
|
||||
return labsFeatures.map((f) => {
|
||||
return f.id;
|
||||
});
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user