mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 05:04:57 +08:00
skip unnecessary filter
This commit is contained in:
parent
04b27f8678
commit
4e793d4f68
@ -39,16 +39,18 @@ export default {
|
||||
// The old flag: honourned for backwards compat
|
||||
const enableLabs = SdkConfig.get()['enableLabs'];
|
||||
|
||||
return FEATURES.filter((f) => {
|
||||
if (enableLabs) {
|
||||
return true;
|
||||
}
|
||||
|
||||
const sdkConfigValue = featuresConfig[f.id];
|
||||
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