Skip to content

Commit b2c8c4e

Browse files
committed
override behavior 1
1 parent a07ecd4 commit b2c8c4e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/feature-toggles.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,10 @@ class FeatureToggles {
237237
for (const [featureKey, value] of entries) {
238238
if (this.__config[featureKey]) {
239239
switch (mergeConflictBehavior) {
240+
case CONFIG_MERGE_CONFLICT.OVERRIDE: {
241+
this.removeAllFeatureValueValidation(featureKey);
242+
break;
243+
}
240244
case CONFIG_MERGE_CONFLICT.PRESERVE: {
241245
continue;
242246
}
@@ -280,7 +284,6 @@ class FeatureToggles {
280284

281285
const { type, active, appUrl, fallbackValue, validations } = value;
282286

283-
this.__featureKeys.push(featureKey);
284287
this.__fallbackValues[featureKey] = fallbackValue;
285288
this.__config[featureKey] = {};
286289

@@ -332,6 +335,8 @@ class FeatureToggles {
332335
configRuntime
333336
);
334337

338+
this.__featureKeys = Object.keys(this.__fallbackValues);
339+
335340
this.__isConfigProcessed = true;
336341
return {
337342
[CONFIG_SOURCE.AUTO]: configAutoCount,

0 commit comments

Comments
 (0)