skip unnecessary filter

This commit is contained in:
David Baker 2017-10-13 14:11:21 +01:00
parent 04b27f8678
commit 4e793d4f68

View file

@ -39,16 +39,18 @@ export default {
// The old flag: honourned for backwards compat
const enableLabs = SdkConfig.get()['enableLabs'];
return FEATURES.filter((f) => {
let labsFeatures;
if (enableLabs) {
return true;
}
labsFeatures = FEATURES;
} else {
labsFeatures.filter((f) => {
const sdkConfigValue = featuresConfig[f.id];
if (sdkConfigValue === 'labs') {
return true;
}
}).map((f) => {
});
}
return labsFeatures.map((f) => {
return f.id;
});
},