Allow feature flags as strings

This commit is contained in:
Adria Navarro 2025-01-13 17:13:50 +01:00
parent 2558bd3e6a
commit 8281ec4e3e
1 changed files with 1 additions and 1 deletions

View File

@ -2,7 +2,7 @@ import { FeatureFlag } from "@budibase/types"
import { auth } from "../stores/portal"
import { get } from "svelte/store"
export const isEnabled = (featureFlag: FeatureFlag) => {
export const isEnabled = (featureFlag: FeatureFlag | `${FeatureFlag}`) => {
const user = get(auth).user
return !!user?.flags?.[featureFlag]
}