Allow feature flags as strings
This commit is contained in:
parent
2558bd3e6a
commit
8281ec4e3e
|
@ -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]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue