Merge remote-tracking branch 'origin/develop' into release-v0.10.7
commit
705254ac55
|
@ -36,12 +36,21 @@ export default {
|
||||||
getLabsFeatures() {
|
getLabsFeatures() {
|
||||||
const featuresConfig = SdkConfig.get()['features'] || {};
|
const featuresConfig = SdkConfig.get()['features'] || {};
|
||||||
|
|
||||||
return FEATURES.filter((f) => {
|
// The old flag: honourned for backwards compat
|
||||||
|
const enableLabs = SdkConfig.get()['enableLabs'];
|
||||||
|
|
||||||
|
let labsFeatures;
|
||||||
|
if (enableLabs) {
|
||||||
|
labsFeatures = FEATURES;
|
||||||
|
} else {
|
||||||
|
labsFeatures = FEATURES.filter((f) => {
|
||||||
const sdkConfigValue = featuresConfig[f.id];
|
const sdkConfigValue = featuresConfig[f.id];
|
||||||
if (!['enable', 'disable'].includes(sdkConfigValue)) {
|
if (sdkConfigValue === 'labs') {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}).map((f) => {
|
});
|
||||||
|
}
|
||||||
|
return labsFeatures.map((f) => {
|
||||||
return f.id;
|
return f.id;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -193,7 +202,7 @@ export default {
|
||||||
isFeatureEnabled: function(featureId: string): boolean {
|
isFeatureEnabled: function(featureId: string): boolean {
|
||||||
const featuresConfig = SdkConfig.get()['features'];
|
const featuresConfig = SdkConfig.get()['features'];
|
||||||
|
|
||||||
let sdkConfigValue = 'labs';
|
let sdkConfigValue = 'disable';
|
||||||
if (featuresConfig && featuresConfig[featureId] !== undefined) {
|
if (featuresConfig && featuresConfig[featureId] !== undefined) {
|
||||||
sdkConfigValue = featuresConfig[featureId];
|
sdkConfigValue = featuresConfig[featureId];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue