Skip to content

Commit

Permalink
Allow evaluation of simple feature flags not using targeting
Browse files Browse the repository at this point in the history
  • Loading branch information
adams85 committed Mar 14, 2024
1 parent 5fb277f commit e1c6b81
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libs/providers/config-cat/src/lib/config-cat-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export class ConfigCatProvider implements Provider {
const { value, ...evaluationData } = await this._client.getValueDetailsAsync<SettingValue>(
flagKey,
undefined,
transformContext(context),
context.targetingKey != null ? transformContext(context) : undefined,
);

const validatedValue = validateFlagType('boolean', value);
Expand All @@ -121,7 +121,7 @@ export class ConfigCatProvider implements Provider {
const { value, ...evaluationData } = await this._client.getValueDetailsAsync<SettingValue>(
flagKey,
undefined,
transformContext(context),
context.targetingKey != null ? transformContext(context) : undefined,
);

const validatedValue = validateFlagType('string', value);
Expand All @@ -143,7 +143,7 @@ export class ConfigCatProvider implements Provider {
const { value, ...evaluationData } = await this._client.getValueDetailsAsync<SettingValue>(
flagKey,
undefined,
transformContext(context),
context.targetingKey != null ? transformContext(context) : undefined,
);

const validatedValue = validateFlagType('number', value);
Expand All @@ -165,7 +165,7 @@ export class ConfigCatProvider implements Provider {
const { value, ...evaluationData } = await this._client.getValueDetailsAsync(
flagKey,
undefined,
transformContext(context),
context.targetingKey != null ? transformContext(context) : undefined,
);

if (typeof value === 'undefined') {
Expand Down

0 comments on commit e1c6b81

Please sign in to comment.