Skip to content

Commit

Permalink
Rename flags variables
Browse files Browse the repository at this point in the history
  • Loading branch information
AndyBitz committed Apr 19, 2024
1 parent eaba47a commit 5716656
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/web/src/server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,12 @@ export async function track(

const url = new URL(origin);

const flagsToReport: Record<string, unknown> = {};
const allFlags = requestContext?.flags?.getValues();
const flagValuesToReport: Record<string, unknown> = {};
const allFlagValues = requestContext?.flags?.getValues();

if (options?.flags && allFlags) {
if (options?.flags && allFlagValues) {
options.flags.forEach((key) => {
flagsToReport[key] = allFlags[key];
flagValuesToReport[key] = allFlagValues[key];
});
}

Expand All @@ -122,7 +122,7 @@ export async function track(
en: eventName,
ed: props,
f: {
p: flagsToReport,
p: flagValuesToReport,
},
};

Expand Down

0 comments on commit 5716656

Please sign in to comment.