Make store terser

This commit is contained in:
Andrew Kingston 2025-01-06 13:37:55 +00:00
parent 9f712eda71
commit ab3bf05dfe
No known key found for this signature in database
1 changed files with 4 additions and 9 deletions

View File

@ -2,12 +2,7 @@ import { derived, Readable } from "svelte/store"
import { auth } from "@/stores/portal"
import { FeatureFlags, FeatureFlagDefaults } from "@budibase/types"
export const featureFlags: Readable<FeatureFlags> = derived(
[auth],
([$auth]) => {
return {
...FeatureFlagDefaults,
...($auth?.user?.flags || {}),
}
}
)
export const featureFlags: Readable<FeatureFlags> = derived(auth, $auth => ({
...FeatureFlagDefaults,
...($auth?.user?.flags || {}),
}))