From dc28b7e133416577774732d0455b2078a545f6d4 Mon Sep 17 00:00:00 2001 From: Sam Rose Date: Thu, 15 Aug 2024 15:21:58 +0100 Subject: [PATCH] Don't error if you can't get the current tenant ID. --- packages/backend-core/src/features/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/backend-core/src/features/index.ts b/packages/backend-core/src/features/index.ts index d1d757d8a9..42cd5a79b4 100644 --- a/packages/backend-core/src/features/index.ts +++ b/packages/backend-core/src/features/index.ts @@ -136,9 +136,10 @@ export class FlagSet, T extends { [key: string]: V }> { return cachedFlags } + const currentContext = context.getCurrentContext() const tags: Record = {} const flagValues = this.defaults() - const currentTenantId = context.getTenantId() + const currentTenantId = currentContext?.tenantId const specificallySetFalse = new Set() const split = (env.TENANT_FEATURE_FLAGS || "")