Skip to content

Commit

Permalink
fix null cohortUpdater when no cohort configs
Browse files Browse the repository at this point in the history
  • Loading branch information
zhukaihan committed Jul 25, 2024
1 parent b60bb56 commit 1690d80
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/node/src/local/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export class LocalEvaluationClient {
private readonly updater: FlagConfigUpdater;
private readonly assignmentService: AssignmentService;
private readonly evaluation: EvaluationEngine;
private readonly cohortUpdater: CohortUpdater;
private readonly cohortUpdater?: CohortUpdater;

/**
* Directly access the client's flag config cache.
Expand Down Expand Up @@ -264,7 +264,7 @@ export class LocalEvaluationClient {
*/
public async start(): Promise<void> {
await this.updater.start();
await this.cohortUpdater.start();
await this.cohortUpdater?.start();
}

/**
Expand All @@ -274,6 +274,6 @@ export class LocalEvaluationClient {
*/
public stop(): void {
this.updater.stop();
this.cohortUpdater.stop();
this.cohortUpdater?.stop();
}
}

0 comments on commit 1690d80

Please sign in to comment.