Merge remote-tracking branch 'origin/develop' into release-v0.10.7
This commit is contained in:
commit
705254ac55
1 changed files with 16 additions and 7 deletions
|
@ -36,12 +36,21 @@ export default {
|
|||
getLabsFeatures() {
|
||||
const featuresConfig = SdkConfig.get()['features'] || {};
|
||||
|
||||
return FEATURES.filter((f) => {
|
||||
const sdkConfigValue = featuresConfig[f.id];
|
||||
if (!['enable', 'disable'].includes(sdkConfigValue)) {
|
||||
return true;
|
||||
}
|
||||
}).map((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];
|
||||
if (sdkConfigValue === 'labs') {
|
||||
return true;
|
||||
}
|
||||
});
|
||||
}
|
||||
return labsFeatures.map((f) => {
|
||||
return f.id;
|
||||
});
|
||||
},
|
||||
|
@ -193,7 +202,7 @@ export default {
|
|||
isFeatureEnabled: function(featureId: string): boolean {
|
||||
const featuresConfig = SdkConfig.get()['features'];
|
||||
|
||||
let sdkConfigValue = 'labs';
|
||||
let sdkConfigValue = 'disable';
|
||||
if (featuresConfig && featuresConfig[featureId] !== undefined) {
|
||||
sdkConfigValue = featuresConfig[featureId];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue