Skip to content

Commit c5507dc

Browse files
itsjaviclaude
authored andcommitted
chore: hoist the trace's conditional segment out of the template [ENG-2472]
SonarCloud typescript:S4624 on the previous commit — a nested template literal. Hoisting the removed-keys segment into its own const also makes this match the other three SDKs, which all build that fragment as a local (`let removed` / `val removed` / `final removed`) rather than inline. Same output, and the trace tests are unchanged and still green. pnpm test 195/195 · check-types 3/3 · biome clean.
1 parent 36aa96e commit c5507dc

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎packages/react-native/src/lib/survey/embedded-data.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,10 @@ export class EmbeddedDataStore {
9090
// `setEmbeddedData` gets zero confirmation until a survey happens to display. Debug level, which
9191
// this SDK gates on `__DEV__`, so a release build never prints it. Keys only, never values — the
9292
// documented use of this bag includes hashed identity fields.
93+
const removedSegment =
94+
removed.length > 0 ? `, removed [${removed.join(", ")}]` : "";
9395
Logger.getInstance().debug(
94-
`setEmbeddedData: set [${set.join(", ")}]${removed.length > 0 ? `, removed [${removed.join(", ")}]` : ""} — the bag now holds [${[...this.data.keys()].join(", ")}]. Keys land on a response only if the survey declares them as ingested Embedded Data fields.`,
96+
`setEmbeddedData: set [${set.join(", ")}]${removedSegment} — the bag now holds [${[...this.data.keys()].join(", ")}]. Keys land on a response only if the survey declares them as ingested Embedded Data fields.`,
9597
);
9698
}
9799

0 commit comments

Comments
 (0)