From 50078f4f0f85b7a67bd549c9b73f7a165df62aa4 Mon Sep 17 00:00:00 2001 From: Peter Clement Date: Fri, 19 Jan 2024 14:59:08 +0000 Subject: [PATCH] Fix issue where flagClient could be undefined when running outside of test mode --- packages/server/src/utilities/redis.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/server/src/utilities/redis.ts b/packages/server/src/utilities/redis.ts index d833ed2c10..a4154b7b95 100644 --- a/packages/server/src/utilities/redis.ts +++ b/packages/server/src/utilities/redis.ts @@ -94,7 +94,7 @@ export async function setTestFlag(id: string) { } export async function checkTestFlag(id: string) { - const flag = await flagClient.get(id) + const flag = await flagClient?.get(id) return !!(flag && flag.testing) }