Skip to content

Conversation

@ZamoraEmmanuel
Copy link
Contributor

No description provided.

@ZamoraEmmanuel ZamoraEmmanuel requested a review from a team as a code owner September 2, 2025 20:45
flagKey,
this.transformContext(context)
);
const flagName = details.value.toLowerCase();
Copy link
Contributor

Choose a reason for hiding this comment

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

flagName sounds like the feature flag name, but here the variable refers to the treatment value, right? So flagValue or flagTreatment are more appropriate names.

if (trafficType == null || trafficType === "")
throw new ParseError("Missing trafficType variable, required to track");

let value = 0;
Copy link
Contributor

@EmilianoSanchez EmilianoSanchez Sep 3, 2025

Choose a reason for hiding this comment

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

value should not be 0 by default, but undefined. We should support the default case where the user doesn't want to send a value with the event. For example when calling track without value: client.track(targettingKey, trafficType, trackingEventName);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agree, but internally the sdk sends 0 if value is undefined, so it will not have major difference

@ZamoraEmmanuel ZamoraEmmanuel merged commit fdeba09 into development Sep 8, 2025
1 check passed
@ZamoraEmmanuel ZamoraEmmanuel deleted the fme-9851 branch September 8, 2025 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants