Skip to content

Commit

Permalink
fix: Use flag value whenever provided even if variaiton is null or un…
Browse files Browse the repository at this point in the history
…defined. (#581)
  • Loading branch information
kinyoklion authored Sep 13, 2024
1 parent ed5a206 commit d11224c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/shared/sdk-client/src/LDClientImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -545,8 +545,8 @@ export default class LDClientImpl implements LDClient {
}

const successDetail = createSuccessEvaluationDetail(value, variation, reason);
if (variation === undefined || variation === null) {
this.logger.debug('Result value is null in variation');
if (value === undefined || value === null) {
this.logger.debug('Result value is null. Providing default value.');
successDetail.value = defaultValue;
}
this.eventProcessor?.sendEvent(
Expand Down

0 comments on commit d11224c

Please sign in to comment.