From f94873bd5dad0eed04f7d70786b7bf265a9f57d2 Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 13 Oct 2017 13:58:24 +0100 Subject: [PATCH] Honour the (now legacy) enableLabs flag --- src/UserSettingsStore.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/UserSettingsStore.js b/src/UserSettingsStore.js index 1071448b5b..7bcef8b7be 100644 --- a/src/UserSettingsStore.js +++ b/src/UserSettingsStore.js @@ -36,9 +36,16 @@ export default { getLabsFeatures() { const featuresConfig = SdkConfig.get()['features'] || {}; + // 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 (!['enable', 'disable'].includes(sdkConfigValue)) { + if (sdkConfigValue === 'labs') { return true; } }).map((f) => {