mirror of
https://github.com/element-hq/element-web
synced 2024-11-29 04:48:50 +03:00
skip unnecessary filter
This commit is contained in:
parent
04b27f8678
commit
4e793d4f68
1 changed files with 12 additions and 10 deletions
|
@ -39,16 +39,18 @@ export default {
|
||||||
// The old flag: honourned for backwards compat
|
// The old flag: honourned for backwards compat
|
||||||
const enableLabs = SdkConfig.get()['enableLabs'];
|
const enableLabs = SdkConfig.get()['enableLabs'];
|
||||||
|
|
||||||
return FEATURES.filter((f) => {
|
let labsFeatures;
|
||||||
if (enableLabs) {
|
if (enableLabs) {
|
||||||
return true;
|
labsFeatures = FEATURES;
|
||||||
}
|
} else {
|
||||||
|
labsFeatures.filter((f) => {
|
||||||
const sdkConfigValue = featuresConfig[f.id];
|
const sdkConfigValue = featuresConfig[f.id];
|
||||||
if (sdkConfigValue === 'labs') {
|
if (sdkConfigValue === 'labs') {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}).map((f) => {
|
});
|
||||||
|
}
|
||||||
|
return labsFeatures.map((f) => {
|
||||||
return f.id;
|
return f.id;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue