Honour the (now legacy) enableLabs flag

pull/21833/head
David Baker 2017-10-13 13:58:24 +01:00
parent f5f0c7e715
commit f94873bd5d
1 changed files with 8 additions and 1 deletions

View File

@ -36,9 +36,16 @@ export default {
getLabsFeatures() { getLabsFeatures() {
const featuresConfig = SdkConfig.get()['features'] || {}; const featuresConfig = SdkConfig.get()['features'] || {};
// The old flag: honourned for backwards compat
const enableLabs = SdkConfig.get()['enableLabs'];
return FEATURES.filter((f) => { return FEATURES.filter((f) => {
if (enableLabs) {
return true;
}
const sdkConfigValue = featuresConfig[f.id]; const sdkConfigValue = featuresConfig[f.id];
if (!['enable', 'disable'].includes(sdkConfigValue)) { if (sdkConfigValue === 'labs') {
return true; return true;
} }
}).map((f) => { }).map((f) => {