Skip to content

Commit 96185fb

Browse files
committed
Add more comments.
1 parent c8d3c05 commit 96185fb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/sdk/ai/src/LDAIClientImpl.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ export class LDAIClientImpl implements LDAIClient {
4141
variables?: Record<string, unknown>,
4242
): Promise<LDAIConfig> {
4343
const value: VariationContent = await this._ldClient.variation(key, context, defaultValue);
44+
// We are going to modify the contents before returning them, so we make a copy.
45+
// This isn't a deep copy and the application developer should not modify the returned content.
4446
const config: LDGenerationConfig = { ...value };
4547
const allVariables = { ldctx: context, ...variables };
4648

0 commit comments

Comments
 (0)