From 8ce5ce578dc3611dfee9b82f3e3da36a4a2e5597 Mon Sep 17 00:00:00 2001 From: zhiyuanliang Date: Wed, 6 Nov 2024 18:25:24 +0800 Subject: [PATCH] small fix --- src/featureManager.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/featureManager.ts b/src/featureManager.ts index 8cb4008..6c02faa 100644 --- a/src/featureManager.ts +++ b/src/featureManager.ts @@ -30,7 +30,7 @@ export class FeatureManager { // If multiple feature flags are found, the first one takes precedence. async isEnabled(featureName: string, context?: unknown): Promise { - const featureFlag = await this.#getFeatureFlag(featureName); + const featureFlag = await this.#provider.getFeatureFlag(featureName); if (featureFlag === undefined) { // If the feature is not found, then it is disabled. return false; @@ -71,12 +71,6 @@ export class FeatureManager { // If we get here, then we have not found a client filter that matches the requirement type. return !shortCircuitEvaluationResult; } - - async #getFeatureFlag(featureName: string): Promise { - const featureFlag = await this.#provider.getFeatureFlag(featureName); - return featureFlag; - } - } interface FeatureManagerOptions {