Don't error if you can't get the current tenant ID.

This commit is contained in:
Sam Rose 2024-08-15 15:21:58 +01:00
parent 354e5dd34c
commit dc28b7e133
No known key found for this signature in database
1 changed files with 2 additions and 1 deletions

View File

@ -136,9 +136,10 @@ export class FlagSet<V extends Flag<any>, T extends { [key: string]: V }> {
return cachedFlags
}
const currentContext = context.getCurrentContext()
const tags: Record<string, any> = {}
const flagValues = this.defaults()
const currentTenantId = context.getTenantId()
const currentTenantId = currentContext?.tenantId
const specificallySetFalse = new Set<string>()
const split = (env.TENANT_FEATURE_FLAGS || "")