Skip to content

Commit

Permalink
fix: fetch experimentKey from rule
Browse files Browse the repository at this point in the history
  • Loading branch information
Abhi591 committed Jun 3, 2024
1 parent e5ea308 commit cb42305
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/api/GetFlag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ export class FlagApi implements IGetFlag {
experimentVariationToReturn = whitelistedObject.variation;
Object.assign(passedRulesInformation, {
experimentId: rule.getId(),
experimentKey: whitelistedObject.experimentKey,
experimentKey: rule.getKey(),
experimentVariationId: whitelistedObject.variationId,
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ export class SegmentEvaluator implements Segmentation {
}

// this will be checked for all cases where wildcard is not present
if (expectedValues.includes(actualValue)) {
if (expectedValues.includes(actualValue.toLowerCase())) {
return true; // Direct value match found, return true
}
}
Expand Down

0 comments on commit cb42305

Please sign in to comment.