Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/lib/util/flag-resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default class FlagResolver implements IFlagResolver {
const exp = this.experiments[expName];
if (exp) {
if (typeof exp === 'boolean') return exp;
else if (exp.enabled) return exp.enabled;
else if (exp.enabled || exp.feature_enabled) return true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

int he experimental.file we have enabled not feature_enabled. I was adding this line here: #10607

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

e.g. this is one example where we have enabled field only and my change was addressing what we actually do in the experimenta.ts

   streaming: {
        name: 'disabled',
        enabled: parseEnvVarBoolean(
            process.env.UNLEASH_EXPERIMENTAL_STREAMING,
            false,
        ),
    },

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's what we do, but the type is:

export interface Variant {
    name: string;
    enabled: boolean;
    payload?: Payload;
    feature_enabled?: boolean;
}

So we still allow you to have a feature_enabled field. We just don't treat it the same way that the regular unleash client does.

}
return this.externalResolver.isEnabled(expName, context);
}
Expand Down
Loading